]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
f2fs: Make flush bios explicitely sync
authorJan Kara <jack@suse.cz>
Tue, 2 May 2017 15:03:47 +0000 (17:03 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 20 May 2017 12:49:49 +0000 (14:49 +0200)
commit9b3be66cb479de75baafbf8ae2d3fcf979c109c2
tree7be924ee8e42f2efbc4751e650ba5b3d1b636c45
parentbd3dfe5049498ee72c54341a12c5e84a6d61796a
f2fs: Make flush bios explicitely sync

commit 3adc5fcb7edf5f8dfe8d37dcb50ba6b30077c905 upstream.

Commit b685d3d65ac7 "block: treat REQ_FUA and REQ_PREFLUSH as
synchronous" removed REQ_SYNC flag from WRITE_{FUA|PREFLUSH|...}
definitions.  generic_make_request_checks() however strips REQ_FUA and
REQ_PREFLUSH flags from a bio when the storage doesn't report volatile
write cache and thus write effectively becomes asynchronous which can
lead to performance regressions.

Fix the problem by making sure all bios which are synchronous are
properly marked with REQ_SYNC.

Fixes: b685d3d65ac791406e0dfd8779cc9b3707fea5a3
CC: Jaegeuk Kim <jaegeuk@kernel.org>
CC: linux-f2fs-devel@lists.sourceforge.net
Signed-off-by: Jan Kara <jack@suse.cz>
Acked-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/f2fs/data.c
fs/f2fs/segment.c
fs/f2fs/super.c