Skip to content

make ->sync_fs mandatory

Christoph Hellwig linux-fsdevel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest11 of 12 patches 4 repliesIn review

11 of 12 patches are in this archive. The cover letter announces 12.

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/12affs: add ->sync_fsfs/affs/super.c+27 -130 replies
2/12bfs: add ->sync_fsfs/bfs/inode.c+21 -110 replies
3/12exofs: add ->sync_fsfs/exofs/super.c+13 -31 reply
4/12ext2: add ->sync_fsfs/ext2/super.c+27 -140 replies
6/12hfs: add ->sync_fsfs/hfs/super.c+11 -00 replies
7/12hfsplus: add ->sync_fsfs/hfsplus/super.c+11 -50 replies
8/12sysv: add ->sync_fsfs/sysv/inode.c+13 -60 replies
9/12ufs: add ->sync_fsfs/ufs/super.c+22 -100 replies
10/12jffs2: call jffs2_write_super from jffs2_sync_fsfs/jffs2/super.c+2 -00 replies
11/12nilfs2: call nilfs2_write_super from nilfs2_sync_fsfs/nilfs2/super.c+2 -00 replies
12/12remove the call to ->write_super in __sync_filesystemfs/sync.c+0 -20 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/12] make ->sync_fs mandatory

Currently the superblock methods are a bit confusing. There is the newer ->sync_fs method which is unconditionally called from __sync_filesystem for data integrity writebacks. And there is the older ->write_super which is called from pdflush for the periodic superblock writeback, but also from __sync_filesystem just before calling ->sync_fs. (And still from file_fsync, but that is about to go away).

This series makes sure all filesystems that need superblock writeouts define a ->sync_fs so we can stop calling ->write_super for the data integrity writeback. This means the presence of ->write_super indicates a filesystem does want periodic superblock writeback and can implement these independently from the data integrity writeback. It also means we don't need to bother with possible s_dirt races for the data integrity syncs.

This patch series first adds ->sync_fs methods to all filesystems having ->write_super, often refactoring the code in that are (and also preparing the ->write_super instances for moving MS_RDONLY checking into the caller), then it makes sure the existing ->sync_fs instaces cover the work previously done in ->write_super for the two cases where they differed widely, and lastly removes the call to ->write_super from __sync_filesystem.