generic: test journal/log replay when a file with cloned extents was fsync'ed
authorFilipe Manana <fdmanana@suse.com>
Fri, 29 Nov 2019 15:15:09 +0000 (15:15 +0000)
committerEryu Guan <guaneryu@gmail.com>
Sun, 1 Dec 2019 16:01:05 +0000 (00:01 +0800)
commit5652a4880c546fe038a32d946f2c7d8b803fde75
treeb74c125b2759aa030017aa0c9e49faa6bd4b1711
parent9a09e4ec7284c070be672352bdd1b993e605aece
generic: test journal/log replay when a file with cloned extents was fsync'ed

Test that if we clone part of an extent from a file to itself at a
different offset, fsync it, rewrite (COW) part of the extent from the
former offset, fsync it again, power fail and then mount the filesystem,
we are able to read the whole file and it has the correct data.

This is motivated by a bug found in btrfs which is fixed by a kernel patch
that has the following subject:

  "Btrfs: fix missing data checksums after replaying a log tree"

Signed-off-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: Eryu Guan <guaneryu@gmail.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
tests/generic/588 [new file with mode: 0755]
tests/generic/588.out [new file with mode: 0644]
tests/generic/group