]> git-server-git.apps.pok.os.sepia.ceph.com Git - xfstests-dev.git/commit
generic: test fsync after punching hole adjacent to an existing hole
authorFilipe Manana <fdmanana@suse.com>
Thu, 1 Sep 2022 16:10:09 +0000 (17:10 +0100)
committerZorro Lang <zlang@kernel.org>
Sun, 4 Sep 2022 13:44:05 +0000 (21:44 +0800)
commite42fa9fec80271d36a6b87c0de54b87e2e0717fa
treea24fe7cf0f8d257e1c631f7aa88d811be592efdc
parent0044157d90270c5bd18ed58d5b018c6463bc4706
generic: test fsync after punching hole adjacent to an existing hole

Test that if we punch a hole adjacent to an existing hole, fsync the file
and then power fail, the new hole exists after mounting again the
filesystem.

This currently fails on btrfs with kernels 5.18 and 5.19 when not using
the "no-holes" feature. The "no-holes" feature is enabled by default at
mkfs time starting with btrfs-progs 5.15, so to trigger the issue with
btrfs-progs 5.15+ and kernel 5.18 or kernel 5.19, one must set
"-O ^no-holes" in the MKFS_OPTIONS environment variable (part of the
btrfs test matrix).

The issue is fixed for btrfs with the following kernel patch:

   "btrfs: update generation of hole file extent item when merging holes"

Signed-off-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: Zorro Lang <zlang@redhat.com>
Signed-off-by: Zorro Lang <zlang@kernel.org>
tests/generic/695 [new file with mode: 0755]
tests/generic/695.out [new file with mode: 0644]