btrfs: fsync after extent cloning
authorFilipe Manana <fdmanana@suse.com>
Mon, 21 Sep 2015 03:06:17 +0000 (13:06 +1000)
committerDave Chinner <david@fromorbit.com>
Mon, 21 Sep 2015 03:06:17 +0000 (13:06 +1000)
commit83288d506ed6109118fe86f630b827e5f114c4df
tree23b280dae31407f09a00f35f810060bf323ac62c
parente5aa6888b6c53dc85630d3ce41f988c02193e215
btrfs: fsync after extent cloning

Test that if we fsync a file that got one extent partially cloned into a
lower file offset, after a power failure our file has the same content it
had before the power failure and after the extent cloning operation.

This test is motivated by an issue found in btrfs that is fixed by the
linux kernel patch titled:

  "Btrfs: fix file read corruption after extent cloning and fsync"

Signed-off-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: Eryu Guan <eguan@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
tests/btrfs/098 [new file with mode: 0755]
tests/btrfs/098.out [new file with mode: 0644]
tests/btrfs/group