Files
kernel_arpi/include/uapi/linux
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
..
2019-01-28 08:13:52 +01:00
2019-04-15 18:14:01 -04:00
2019-03-07 18:32:01 -08:00
2019-01-24 11:11:42 -07:00
2019-04-27 09:07:04 -07:00
2019-02-14 11:51:51 -05:00
2018-12-20 19:13:07 +01:00
2019-03-27 13:30:07 -07:00
2018-09-13 10:46:24 +02:00
2018-09-05 22:27:11 -07:00
2018-07-07 17:41:38 +02:00
2018-08-03 10:03:57 -07:00
2018-12-19 09:40:13 +01:00
2018-12-16 12:15:25 -08:00
2018-12-01 12:38:32 +01:00
2019-01-22 10:21:45 +01:00
2019-05-07 14:31:03 +02:00
2019-03-23 21:50:05 -04:00
2019-02-14 11:51:51 -05:00
2018-09-03 13:29:38 +02:00