lkml.org 
[lkml]   [2011]   [May]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 01/17] writeback: introduce .tagged_sync for the WB_SYNC_NONE sync stage
On Fri, May 13, 2011 at 06:40:13AM +0800, Dave Chinner wrote:
> On Thu, May 12, 2011 at 09:57:07PM +0800, Wu Fengguang wrote:
> > sync(2) is performed in two stages: the WB_SYNC_NONE sync and the
> > WB_SYNC_ALL sync. Tag the first stage with wbc.tagged_sync and do
> > livelock prevention for it, too.
> >
> > Note that writeback_inodes_sb() is called by not only sync(), they are
> > treated the same because the other callers also need livelock prevention.
> >
> > Impact: It changes the order in which pages/inodes are synced to disk.
> > Now in the WB_SYNC_NONE stage, it won't proceed to write the next inode
> > until finished with the current inode.
>
> What about all the filesystems that implement their own
> .writepages()/write_cache_pages() functions or have
> have special code that checks WB_SYNC_ALL in .writepages (e.g. gfs2,
> ext4, btrfs and perhaps others). Don't they all need to be aware of
> this tagged_sync field?

Right, good point. Currently only ext4 is updated. The other
filesystems --- afs, btrfs, cifs, gfs2 --- do not even use
PAGECACHE_TAG_TOWRITE for livelock prevention. My plan was to add
PAGECACHE_TAG_TOWRITE and tagged_sync code to them as the next step,
when tagged_sync is accepted and proved to work fine.

Thanks,
Fengguang


\
 
 \ /
  Last update: 2011-05-13 04:59    [W:1.026 / U:0.016 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site