]> www.infradead.org Git - users/hch/xfstests-dev.git/commit
xfs/009: allow logically contiguous preallocations
authorDarrick J. Wong <djwong@kernel.org>
Tue, 26 Nov 2024 01:22:37 +0000 (17:22 -0800)
committerZorro Lang <zlang@kernel.org>
Thu, 28 Nov 2024 13:39:49 +0000 (21:39 +0800)
commitd9352ed5e24a51fead3c5760cddce28262bc9e07
tree9704b717b28ef4f93377df0454557d401043a853
parent38257f559615e56c0f788ee01ce4e4b99d0c29a5
xfs/009: allow logically contiguous preallocations

The new rtgroups feature implements a simplistic rotor to pick the
rtgroup for an initial allocation to a file.  This causes test failures
if the preallocations are spread across two rtgroups, which happens if
there are more subtests than rtgroups.

One way to fix this would be to reset the rotor then each subtest starts
allocating from rtgroup 0, but the only way to do that is to cycle the
scratch mount, which is a bit gross.

Instead, report logically contiguous mappings as a single mapping even
if the physical space is not contiguous.  Unfortunately, there's not
enough context in the comments to know if the test actually was checking
for physical contiguity?  Or if this is just an exerciser of the old
preallocation calls, and it's fine as long as the file ranges are mapped
(or unmapped) as desired.

Messing with some awk is a lot cheaper than umount/mount cycling.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Zorro Lang <zlang@kernel.org>
tests/xfs/009