]> git.baikalelectronics.ru Git - kernel.git/commit
Btrfs: disable FUA if mounted with nobarrier
authorOmar Sandoval <osandov@fb.com>
Wed, 6 Dec 2017 06:54:02 +0000 (22:54 -0800)
committerDavid Sterba <dsterba@suse.com>
Wed, 6 Dec 2017 23:34:45 +0000 (00:34 +0100)
commitad2cf236e9a1f9e46df6f34d18bbbcca5a8d4cca
treeaa65438cf8ccfd2c449a17ce1433d9be4d9f3d4f
parent9095beeef7e8a48e3a41b60a1f92bc349e5a2b26
Btrfs: disable FUA if mounted with nobarrier

I was seeing disk flushes still happening when I mounted a Btrfs
filesystem with nobarrier for testing. This is because we use FUA to
write out the first super block, and on devices without FUA support, the
block layer translates FUA to a flush. Even on devices supporting true
FUA, using FUA when we asked for no barriers is surprising.

Fixes: b8a1ec7d90e228b ("Btrfs: fix barrier flushes")
Signed-off-by: Omar Sandoval <osandov@fb.com>
Reviewed-by: Qu Wenruo <wqu@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/disk-io.c