Hi,

On Thu, Jan 25, 2001 at 04:17:30PM +0530, V Ganesh wrote:

> so i_dirty_buffers contains buffer_heads of pages coming from write() as
> well as metadata buffers from mark_buffer_dirty_inode(). a dirty MAP_SHARED
> page which has been write()n to will potentially exist in both lists.
> won't doing a set_dirty_page() instead of buffer_insert_inode_queue() in
> __block_commit_write() make things much simpler ? then we'd have i_dirty_buffers
> having _only_ metadata, and all data pages in the i_mapping->*_pages lists.

That would only complicate things: it would mean we'd have to scan
both lists on fsync instead of just the one, for example.  There are a
number of places where we need buffer lists for dirty data anyway,
such as for bdflush's background sync to disk.  We also maintain the
per-page buffer lists as caches of the virtual-to-physical mapping to
avoid redundant bmap()ping.  So, removing the buffer_heads which alias
the page cache data isn't an option.  Given that, it's as well to keep
all the inode's dirty buffers in the one place.

Cheers,
 Stephen
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/

Reply via email to