]> git.baikalelectronics.ru Git - kernel.git/commit
ext4: mark superblock writes synchronous for nobarrier mounts
authorJan Kara <jack@suse.cz>
Thu, 4 May 2017 14:58:03 +0000 (10:58 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Thu, 4 May 2017 14:58:03 +0000 (10:58 -0400)
commita120c04cf969d7137e358c0619f7cf3f5dfbb2e4
tree10324840e8a8d2db2a5dc3f5904b009520622200
parent82e6216130b6f8d0a5ae2f90ea07188435bed1c2
ext4: mark superblock writes synchronous for nobarrier mounts

Commit bfd23d80bb09 "block: treat REQ_FUA and REQ_PREFLUSH as
synchronous" removed REQ_SYNC flag from WRITE_FUA implementation.
generic_make_request_checks() however strips REQ_FUA flag from a bio
when the storage doesn't report volatile write cache and thus write
effectively becomes asynchronous which can lead to performance
regressions. This affects superblock writes for ext4. Fix the problem
by marking superblock writes always as synchronous.

Fixes: bfd23d80bb096a059c05d601125ab6a4fafd15d6
CC: linux-ext4@vger.kernel.org
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
fs/ext4/super.c