]> git.apps.os.sepia.ceph.com Git - xfstests-dev.git/commit
xfs: test regression in shrink when the new EOFS splits a sparse inode cluster
authorDarrick J. Wong <djwong@kernel.org>
Wed, 28 Jul 2021 00:10:35 +0000 (17:10 -0700)
committerEryu Guan <guaneryu@gmail.com>
Sun, 15 Aug 2021 16:10:59 +0000 (00:10 +0800)
commitae8c30c34c51b5a5c5dd1639ec83ef901a40b3ad
tree3288eb4692288565a21c43a6c9f1dedb6d7fcda6
parent96d4e404f1881ccf97469f27e9ecc34743b41834
xfs: test regression in shrink when the new EOFS splits a sparse inode cluster

This is a targeted regression test for commit da062d16a897 ("xfs:
check for sparse inode clusters that cross new EOAG when shrinking"),
which was found by running the random-loopy shrink stresser xfs/168.

The original shrink implementation assumed that if we could allocate
the last free extent in the filesystem, it was ok to proceed with
the fs shrink.  Unfortunately, this isn't quite the case -- if
there's a sparse inode cluster such that the blocks at the end of
the cluster are free, it is not ok to shrink the fs to the point
that part of the cluster hangs off the end of the filesystem.  Doing
so results in repair and scrub marking the filesystem corrupt, so we
must not.

(EOFS == "end of filesystem"; EOAG == "end of allocation group")

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Zorro Lang <zlang@redhat.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
tests/xfs/176 [new file with mode: 0755]
tests/xfs/176.out [new file with mode: 0644]