]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: Make flush bios explicitely sync
authorJan Kara <jack@suse.cz>
Tue, 2 May 2017 15:03:50 +0000 (17:03 +0200)
committerDavid Sterba <dsterba@suse.com>
Tue, 16 May 2017 13:42:01 +0000 (15:42 +0200)
commit3124668ab255a53e5c612b52e8c329bc614733af
tree7a10ebc80a4d62384bdf0e72e2d522f18aba1c63
parent7bbed8ec663304b9afbed07e026a35a8d8119d11
btrfs: Make flush bios explicitely sync

Commit 8eecb540590c "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.

CC: David Sterba <dsterba@suse.com>
CC: linux-btrfs@vger.kernel.org
Fixes: 8eecb540590c70d97c0366ea02a6a436c87fa8ef
Signed-off-by: Jan Kara <jack@suse.cz>
Reviewed-by: Liu Bo <bo.li.liu@oracle.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/disk-io.c