summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorDarrick J. Wong <djwong@kernel.org>2023-11-13 09:08:30 -0800
committerZorro Lang <zlang@kernel.org>2023-11-16 22:47:09 +0800
commitb5ba77147bf6cf6766ada00b3fed4635626e550d (patch)
treeae5f977e029c6d4b9436ecbc31ede1d5286626a2 /common
parent59bf56a1a56e8b588d18c4c39757b439342cd24d (diff)
xfs: test unlinked inode list repair on demand
Create a test to exercise recovery of unlinked inodes on a clean filesystem. This was definitely possible on old kernels that on an ro mount would clean the log without processing the iunlink list. Signed-off-by: "Darrick J. Wong" <djwong@kernel.org> Reviewed-by: Zorro Lang <zlang@redhat.com> Signed-off-by: Zorro Lang <zlang@kernel.org>
Diffstat (limited to 'common')
-rw-r--r--common/rc4
1 files changed, 3 insertions, 1 deletions
diff --git a/common/rc b/common/rc
index e64dea10..cc92fe06 100644
--- a/common/rc
+++ b/common/rc
@@ -2668,9 +2668,11 @@ _require_xfs_io_command()
param_checked="$pwrite_opts $param"
;;
"scrub"|"repair")
- testio=`$XFS_IO_PROG -x -c "$command probe" $TEST_DIR 2>&1`
+ test -z "$param" && param="probe"
+ testio=`$XFS_IO_PROG -x -c "$command $param" $TEST_DIR 2>&1`
echo $testio | grep -q "Inappropriate ioctl" && \
_notrun "xfs_io $command support is missing"
+ param_checked="$param"
;;
"startupdate"|"commitupdate"|"cancelupdate")
$XFS_IO_PROG -f -c 'pwrite -S 0x58 0 128k -b 128k' $testfile > /dev/null