Hi, this is a candidate patch to cleanup write_super callback.

VFS layer calls ->write_super callback periodically.  However,
it looks like that calling back is ommited when disk I/O is busy.
And when cleanerd is runnig, disk I/O tend to be busy thus
nilfs superblock is not synchronized as nilfs designed.

To avoid it, syncing superblock by nilfs thread instead of VFS pdflush.

These patches show the basic idea.

First one is a just clean up for nilfs_sync_fs.  writing superblock
must be done very end of the function.

Second one will separeate condition for syncing superblock and alternative
superblock as a inline function.

Third one is the actual patch to sync the superblock in nilfs internal thread.
Because the conditions in nilfs_write_super are using seconds, I used
it as well in the patch.  However, it might be good to use jiffies instead
of using get_seconds.

 
 fs/nilfs2/segment.c   |   13 ++++++++++++-
 fs/nilfs2/super.c     |   16 +++++++---------
 fs/nilfs2/the_nilfs.h |   10 ++++++++++
 3 files changed, 29 insertions(+), 10 deletions(-)

-- 
Jiro SEKIBA <[email protected]>
_______________________________________________
users mailing list
[email protected]
https://www.nilfs.org/mailman/listinfo/users

Reply via email to