btrfs: add a test for multi-subvolume fsyncing
authorJosef Bacik <josef@toxicpanda.com>
Mon, 7 Oct 2019 19:33:39 +0000 (15:33 -0400)
committerEryu Guan <guaneryu@gmail.com>
Sun, 13 Oct 2019 13:01:41 +0000 (21:01 +0800)
commit17c22e556f8fedfc45511c526ca0d5db6daf76b6
tree45c38142ba76c0104d1f60a341070b103e23cc2c
parent78fa1fb8163d0c61d37b26b1aa08008b444cfba3
btrfs: add a test for multi-subvolume fsyncing

I discovered a problem in btrfs where we'd end up pointing at a block we
hadn't written out yet.  This is triggered by a race when two different
files on two different subvolumes fsync.  This test exercises this path
with dm-log-writes, and then replays the log at every FUA to verify the
file system is still mountable and the log is replayable.

This test is to verify the fix

btrfs: fix incorrect updating of log root tree

actually fixed the problem.

Reviewed-by: Filipe Manana <fdmanana@suse.com>
Signed-off-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
tests/btrfs/196 [new file with mode: 0755]
tests/btrfs/196.out [new file with mode: 0644]
tests/btrfs/group