1
0
Fork 0
alistair23-linux/include/uapi
Amir Goldstein c553ea4fdf fs/sync.c: sync_file_range(2) may use WB_SYNC_ALL writeback
23d0127096 ("fs/sync.c: make sync_file_range(2) use WB_SYNC_NONE
writeback") claims that sync_file_range(2) syscall was "created for
userspace to be able to issue background writeout and so waiting for
in-flight IO is undesirable there" and changes the writeback (back) to
WB_SYNC_NONE.

This claim is only partially true.  It is true for users that use the flag
SYNC_FILE_RANGE_WRITE by itself, as does PostgreSQL, the user that was the
reason for changing to WB_SYNC_NONE writeback.

However, that claim is not true for users that use that flag combination
SYNC_FILE_RANGE_{WAIT_BEFORE|WRITE|_WAIT_AFTER}.  Those users explicitly
requested to wait for in-flight IO as well as to writeback of dirty pages.

Re-brand that flag combination as SYNC_FILE_RANGE_WRITE_AND_WAIT and use
WB_SYNC_ALL writeback to perform the full range sync request.

Link: http://lkml.kernel.org/r/20190409114922.30095-1-amir73il@gmail.com
Link: http://lkml.kernel.org/r/20190419072938.31320-1-amir73il@gmail.com
Fixes: 23d0127096 ("fs/sync.c: make sync_file_range(2) use WB_SYNC_NONE")
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Acked-by: Jan Kara <jack@suse.com>
Cc: Dave Chinner <david@fromorbit.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2019-05-14 09:47:50 -07:00
..
asm-generic net: socket: implement 64-bit timestamps 2019-04-19 14:07:40 -07:00
drm drm: introduce a capability flag for syncobj timeline support 2019-05-02 12:36:47 +10:00
linux fs/sync.c: sync_file_range(2) may use WB_SYNC_ALL writeback 2019-05-14 09:47:50 -07:00
misc uapi/habanalabs: add missing fields in bmon params 2019-04-21 16:20:46 +03:00
mtd ubi: Expose the bitrot interface 2019-02-24 11:40:45 +01:00
rdma RDMA/efa: Add the ABI definitions 2019-05-06 15:18:17 -03:00
scsi scsi: fc: add FPIN ELS definition 2019-04-08 21:29:16 -04:00
sound Merge branch 'asoc-5.2' into asoc-next 2019-05-06 22:51:54 +09:00
video
xen xen/gntdev: Add initial support for dma-buf UAPI 2018-07-26 23:05:14 -04:00