]> 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)
commit88061f93f1b7d9201085b07e2947322f9b6e1b15
treeaa65438cf8ccfd2c449a17ce1433d9be4d9f3d4f
parent71b63ff340df54a7d59995f0e6f3ee8d98ddc85e
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: 7ef447a8346630a ("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