btrfs: add a test for fsync of file with prealloc extents crossing eof
authorFilipe Manana <fdmanana@suse.com>
Tue, 21 Apr 2020 10:25:39 +0000 (11:25 +0100)
committerEryu Guan <guaneryu@gmail.com>
Sun, 10 May 2020 12:54:18 +0000 (20:54 +0800)
commit10aa5e2904d240cd8b82453700d8d78860b60478
tree914241352862047365f50f170137a0c154b7a9a4
parent4590ee0ad3f9fd2529b9927c78f059477b1cac8c
btrfs: add a test for fsync of file with prealloc extents crossing eof

Test that if we fsync a file with prealloc extents that start before and
after the file's size, we don't end up with missing parts of the extents
and implicit file holes after a power failure. Test both without and with
the NO_HOLES feature.

It is fixed commit f135cea30de5 ("btrfs: fix partial loss of
prealloc extent past i_size after fsync")

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