]> git-server-git.apps.pok.os.sepia.ceph.com Git - xfstests-dev.git/commit
fiemap-tester: holes can be backed by unwritten extents
authorDarrick J. Wong <djwong@kernel.org>
Tue, 2 May 2023 20:08:34 +0000 (13:08 -0700)
committerZorro Lang <zlang@kernel.org>
Sun, 14 May 2023 13:51:47 +0000 (21:51 +0800)
commitc387c694bde333fb3e1f46e09b65a7d4b5e52572
treef3b92e7b46bf62c8a038916f8a262dc7f99f9ac7
parent715d052a8fafc049944d3e295d5b53177b184a22
fiemap-tester: holes can be backed by unwritten extents

Filesystem behavior is pretty open-ended for sparse ranges (i.e. holes)
of a file that have not yet been written to.  That space can remain
unmapped, it can be mapped to written space that has been zeroed, or it
can be mapped to unwritten extents.

This program trips over that last condition on XFS.  If the file is
located on a data device with a raid stripe geometry or on a realtime
device with a realtime extent size larger than 1 filesystem block, it's
possible for unwritten areas to be backed by unwritten preallocations or
unwritten rt blocks, respectively.

Fix the test to skip unwritten extents here.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Zorro Lang <zlang@redhat.com>
Signed-off-by: Zorro Lang <zlang@kernel.org>
src/fiemap-tester.c