Badari Pulavarty <[EMAIL PROTECTED]> wrote: > > Is there anything wrong, if we tear down bufferheads after the > writepage/writepages is complete ? may be "-nobh" option for ext3 ?
The I/O completion will happen in interrupt context, which isn't really a good place to remove those bh's - the buffer_heads would need to be removed from their journal_heads first. That's assuming data=ordered. For data=writeback we could perhaps inspect buffer_heads_over_limit in end_buffer_async_write(), and if true, try to strip the buffers in interrupt context. For data=ordered the best place would be in checkpoint.c somewhere, where we're detaching buffer_heads from a completed transaction: trylock the page, strip the journal_heads, try to strip the buffers, unlock page. > Even for ext2 with "-nobh" and JFS - we seem to attach buffer heads > to page in __block_write_full_page() and leave them around. I was > thinking, they gets tossed out after the write-out completes. No ? For ext2 nobh we never attach buffer_heads to regular pagecache pages. They're only used for metadata. nobh_prepare_write() doesn't add them and neither does writepages(). - 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