f2fs: avoid IO split due to mixed WB_SYNC_ALL and WB_SYNC_NONE
authorJaegeuk Kim <jaegeuk@kernel.org>
Wed, 29 Mar 2017 01:07:38 +0000 (18:07 -0700)
committerJaegeuk Kim <jaegeuk@kernel.org>
Wed, 5 Apr 2017 18:05:06 +0000 (11:05 -0700)
commit687de7f1010cb819d04b768556960d3689abe02b
treec32a4ccac2d084d51e2074e7184598bf4cd37349
parentef095d19e82f25bbdead472b8b71f4ef3b7a636d
f2fs: avoid IO split due to mixed WB_SYNC_ALL and WB_SYNC_NONE

If two threads try to flush dirty pages in different inodes respectively,
f2fs_write_data_pages() will produce WRITE and WRITE_SYNC one at a time,
resulting in a lot of 4KB seperated IOs.

So, this patch gives higher priority to WB_SYNC_ALL IOs and gathers write
IOs with a big WRITE_SYNC'ed bio.

Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/data.c
fs/f2fs/f2fs.h
fs/f2fs/super.c