btrfs: test power fail after a ranged fsync when not using the no-holes feature
authorFilipe Manana <fdmanana@suse.com>
Fri, 6 Mar 2020 17:51:02 +0000 (17:51 +0000)
committerEryu Guan <guaneryu@gmail.com>
Sun, 22 Mar 2020 14:16:55 +0000 (22:16 +0800)
commit74278dc293551264b4be0a7d768e0e54bd09f8e9
tree5ac51233f0f4bb6747ff6b7a2ff0d4ca0c419645
parentd116fe3774b9cc1c48723b6a710c55b2fa466799
btrfs: test power fail after a ranged fsync when not using the no-holes feature

Test a scenario were we fsync a range of a file and have a power
failure.  We want to check that after a power failure and mounting
the filesystem, we do not end up with a missing file extent
representing a hole. This applies only when not using the NO_HOLES
feature.

This currently fails on btrfs but it is fixed by a patch for the kernel
that has the following subject:

  "Btrfs: fix missing file extent item for hole after ranged fsync"

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