]> git.apps.os.sepia.ceph.com Git - xfstests-dev.git/commit
generic/365: Fix false failure when mapping ends with free space
authorOjaswin Mujoo <ojaswin@linux.ibm.com>
Tue, 5 Aug 2025 09:25:56 +0000 (14:55 +0530)
committerZorro Lang <zlang@kernel.org>
Fri, 29 Aug 2025 17:11:51 +0000 (01:11 +0800)
commit8735e3e15fc7059cb35262003921cb498bb83153
tree22ffa12e3e60282f2a835ce228cecf9cec4bbc10
parent6ca32795a99ec1da541caf827c4b3417080a37f5
generic/365: Fix false failure when mapping ends with free space

If we have a small FS where the first free space mapping is also the
last mapping of the FS, then the following sub-test fails:

  echo "test whatever came after freesp"
  $XFS_IO_PROG -c "fsmap -d $((freesp_end + 2)) $((freesp_end + 3))" $SCRATCH_MNT

since there is nothing after the freespace. Fix this by punching a 1M
hole in a 3M file to ensure that the first free space is always
surrounded by allocated blocks.

Signed-off-by: Ojaswin Mujoo <ojaswin@linux.ibm.com>
Tested-by: Disha Goel <disgoel@linux.ibm.com>
Reviewed-by: Zorro Lang <zlang@redhat.com>
Signed-off-by: Zorro Lang <zlang@kernel.org>
tests/generic/365