]> asedeno.scripts.mit.edu Git - linux.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)
commit1b9e619c5bc8235cfba3dc4ced2fb0e3554a05d4
treeaa65438cf8ccfd2c449a17ce1433d9be4d9f3d4f
parente19182c0fff451e3744c1107d98f072e7ca377a0
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: 387125fc722a8ed ("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