Alex Tomas wrote:
Nikita Danilov (ND) writes:
>>> > In order to do the correct accounting, we need to mark a page
>>> > to indicate if we reserved a block or not. One way to do this,
>>> > to use page->private to indicate this. But then, all the generic
>>>
>>> I believe one can use PG_mappedtodisk bit in page->flags for this
>>> purpose. There was old Andrew Morton's patch that introduced new bit
>>> (PG_delalloc?) for this purpose.
>>
>> That would be good. But I don't feel like asking for a bit in page
>> if there is a way to get around it.
ND> Clarification: PG_mappedtodisk is already here, it seems you can reuse
ND> this already existing bit to implement delayed allocation support.
I think we need another one, because mappedtodisk != reserved. we could use
mappedtodisk, but this means in ->commit_write() we'd need to check that one
more time (first time in ->prepare_write())
Yep. We need one more to indicate the we reserved a block for this page.
Other option I was thinking on how to avoid is, by "reserving" a block
when a mapped page changes from read -> write. Andrew's -mm tree has
patch to give us a notification when it happens.
Thanks,
Badari
-
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html