Skip to content

Make O_SYNC handling use standard syncing path (Version 2)

Jan Kara linux-ext4 linux-fsdevel linux-nfs linux-xfs lkml ocfs2-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest17 patches 16 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/17vfs: Introduce filemap_fdatawait_rangeinclude/linux/fs.h mm/filemap.c+22 -00 replies
2/17vfs: Export __generic_file_aio_write() and add some commentsinclude/linux/fs.h mm/filemap.c+52 -70 replies
3/17vfs: Remove syncing from generic_file_direct_write() and generic_file_buffered_write()mm/filemap.c+6 -290 replies
4/17pohmelfs: Use __generic_file_aio_write instead of generic_file_aio_write_nolockdrivers/staging/pohmelfs/inode.c+1 -10 replies
5/17ocfs2: Use __generic_file_aio_write instead of generic_file_aio_write_nolockfs/ocfs2/file.c+12 -101 reply
6/17vfs: Rename generic_file_aio_write_nolockdrivers/char/raw.c fs/block_dev.c include/linux/fs.h +1 more+8 -93 replies
7/17vfs: Introduce new helpers for syncing after writing to O_SYNC file or IS_SYNC inodefs/splice.c fs/sync.c include/linux/fs.h +1 more+86 -424 replies
8/17ext2: Update comment about generic_osync_inodefs/ext2/inode.c+1 -10 replies
9/17ext3: Remove syncing logic from ext3_file_writefs/ext3/file.c+1 -600 replies
10/17ext4: Remove syncing logic from ext4_file_writefs/ext4/file.c+2 -510 replies
11/17ntfs: Use new syncing helpers and update commentsfs/ntfs/file.c fs/ntfs/mft.c+10 -190 replies
12/17ocfs2: Update syncing after splicing to match generic versionfs/ocfs2/file.c+6 -213 replies
13/17xfs: Convert sync_page_range() to simple fdatawrite_range()fs/xfs/linux-2.6/xfs_lrw.c+1 -12 replies
14/17pohmelfs: Use new syncing helperdrivers/staging/pohmelfs/inode.c+2 -20 replies
15/17nfs: Remove reference to generic_osync_inode from a commentfs/nfs/direct.c+0 -31 reply
16/17fat: Opencode sync_page_range_nolock()fs/fat/file.c fs/fat/misc.c+22 -40 replies
17/17vfs: Remove generic_osync_inode() and sync_page_range{_nolock}()fs/fs-writeback.c include/linux/fs.h include/linux/writeback.h +1 more+0 -1270 replies

Reviews trailers per patch

6 of 17 patches have a Reviewed-by or Acked-by.

PatchChristoph HellwigEvgeniy PolyakovMark FashehJoel Becker
1/17R-b
2/17R-b A-b
3/17
4/17
5/17A-b
6/17
7/17A-b
8/17
9/17
10/17
11/17
12/17A-b A-b
13/17
14/17A-b
15/17
16/17
17/17

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 4 reviewers.

Read the v1 thread

Cover letter [PATCH 0/17] Make O_SYNC handling use standard syncing path (Version 2)

Hi,

first, sorry for a few patches sent before this one - I forgot to give
--compose to git send-email and there was a bug in the third patch.
This is the second version of my patch set improving O_SYNC implementation.
The changes against previous version are small. Most notably generic_file_aio_write() now triggers fsync() even when it returns EIOCBQUEUED so that we behave the same way as generic_file_direct_write() did. I've added patch renaming generic_file_aio_write_nolock() to device_aio_write() (since it's used by fs/block_dev.c and drivers/char/raw.c). And finally I've optimized XFS syncing as Christoph has suggested.
Any comments welcome and BTW I'd be happy if affected fs maintainers
had a look at those patches so that I can add their ack.
Honza
---
Here's some rationale for the patch set:
The patch set unifines O_SYNC handling with standard fsync() path. After this, we have just one place forcing a single file to disk so filesystems like ext3 / ext4 don't have to force a transaction commit in ext?_file_write for O_SYNC files / IS_SYNC inodes. The code is also cleaner this way (actually about 150 lines shorter), we don't sync the inode several times as it happened previously etc.