mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-06 08:46:46 +00:00
ext4: mark superblock writes synchronous for nobarrier mounts
Commitb685d3d65a
"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:b685d3d65a
CC: linux-ext4@vger.kernel.org Signed-off-by: Jan Kara <jack@suse.cz> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
This commit is contained in:
parent
aa1dca3bd9
commit
00473374b7
1 changed files with 1 additions and 1 deletions
|
@ -4637,7 +4637,7 @@ static int ext4_commit_super(struct super_block *sb, int sync)
|
|||
if (sync) {
|
||||
unlock_buffer(sbh);
|
||||
error = __sync_dirty_buffer(sbh,
|
||||
test_opt(sb, BARRIER) ? REQ_FUA : REQ_SYNC);
|
||||
REQ_SYNC | (test_opt(sb, BARRIER) ? REQ_FUA : 0));
|
||||
if (error)
|
||||
return error;
|
||||
|
||||
|
|
Loading…
Reference in a new issue