]> git.apps.os.sepia.ceph.com Git - xfstests-dev.git/commitdiff
xfs: race fsstress with realtime refcount btree scrub and repair
authorDarrick J. Wong <djwong@kernel.org>
Thu, 20 Feb 2025 21:47:14 +0000 (13:47 -0800)
committerZorro Lang <zlang@kernel.org>
Thu, 6 Mar 2025 13:25:55 +0000 (21:25 +0800)
Race checking and rebuilding realtime refcount btrees with fsstress.

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/816
tests/xfs/835 [new file with mode: 0755]
tests/xfs/835.out [new file with mode: 0644]
tests/xfs/836 [new file with mode: 0755]
tests/xfs/836.out [new file with mode: 0644]

index 73faf72e598073cd2e870d0c5c3f40bb937d0da4..372cd983491a35e2e2a58b5a9581a5a84c93246c 100755 (executable)
@@ -46,7 +46,7 @@ done
 
 # Metapath verbs that take a rt group number
 for ((rgno = 0; rgno < rgcount; rgno++)); do
-       for v in rtbitmap rtsummary rtrmapbt; do
+       for v in rtbitmap rtsummary rtrmapbt rtrefcbt; do
                testio=$(try_verb "$v" "$rgno")
                test -z "$testio" && verbs+=("$v $rgno")
        done
diff --git a/tests/xfs/835 b/tests/xfs/835
new file mode 100755 (executable)
index 0000000..8bb1daf
--- /dev/null
@@ -0,0 +1,40 @@
+#! /bin/bash
+# SPDX-License-Identifier: GPL-2.0
+# Copyright (c) 2022-2025 Oracle.  All Rights Reserved.
+#
+# FS QA Test No. 835
+#
+# Race fsstress and rt refcount btree scrub for a while to see if we crash or
+# livelock.
+#
+. ./common/preamble
+_begin_fstest scrub fsstress_scrub
+
+_cleanup() {
+       _scratch_xfs_stress_scrub_cleanup &> /dev/null
+       cd /
+       rm -r -f $tmp.*
+}
+_register_cleanup "_cleanup" BUS
+
+. ./common/filter
+. ./common/fuzzy
+. ./common/inject
+. ./common/xfs
+
+_require_realtime
+_require_scratch
+_require_xfs_stress_scrub
+
+_scratch_mkfs > "$seqres.full" 2>&1
+_scratch_mount
+_require_xfs_has_feature "$SCRATCH_MNT" realtime
+_require_xfs_has_feature "$SCRATCH_MNT" reflink
+_xfs_force_bdev realtime $SCRATCH_MNT
+
+_scratch_xfs_stress_scrub -s "scrub rtrefcountbt %rgno%"
+
+# success, all done
+echo Silence is golden
+status=0
+exit
diff --git a/tests/xfs/835.out b/tests/xfs/835.out
new file mode 100644 (file)
index 0000000..4fe0a6d
--- /dev/null
@@ -0,0 +1,2 @@
+QA output created by 835
+Silence is golden
diff --git a/tests/xfs/836 b/tests/xfs/836
new file mode 100755 (executable)
index 0000000..9003c08
--- /dev/null
@@ -0,0 +1,40 @@
+#! /bin/bash
+# SPDX-License-Identifier: GPL-2.0
+# Copyright (c) 2022-2025 Oracle.  All Rights Reserved.
+#
+# FS QA Test No. 836
+#
+# Race fsstress and rt refcount btree scrub for a while to see if we crash or
+# livelock.
+#
+. ./common/preamble
+_begin_fstest online_repair fsstress_online_repair
+
+_cleanup() {
+       _scratch_xfs_stress_scrub_cleanup &> /dev/null
+       cd /
+       rm -r -f $tmp.*
+}
+_register_cleanup "_cleanup" BUS
+
+. ./common/filter
+. ./common/fuzzy
+. ./common/inject
+. ./common/xfs
+
+_require_realtime
+_require_scratch
+_require_xfs_stress_online_repair
+
+_scratch_mkfs > "$seqres.full" 2>&1
+_scratch_mount
+_require_xfs_has_feature "$SCRATCH_MNT" realtime
+_require_xfs_has_feature "$SCRATCH_MNT" reflink
+_xfs_force_bdev realtime $SCRATCH_MNT
+
+_scratch_xfs_stress_online_repair -s "repair rtrefcountbt %rgno%"
+
+# success, all done
+echo Silence is golden
+status=0
+exit
diff --git a/tests/xfs/836.out b/tests/xfs/836.out
new file mode 100644 (file)
index 0000000..cdba420
--- /dev/null
@@ -0,0 +1,2 @@
+QA output created by 836
+Silence is golden