From: Christoph Hellwig <hch@lst.de>
To: Zorro Lang <zlang@kernel.org>
Cc: "Darrick J. Wong" <djwong@kernel.org>,
fstests@vger.kernel.org, linux-xfs@vger.kernel.org
Subject: [PATCH 10/13] xfs/2305: version of generic/475 that run xfs_scrub -x for each iteration
Date: Thu, 24 Sep 2026 12:07:51 +0200 [thread overview]
Message-ID: <20260924100855.2734089-11-hch@lst.de> (raw)
In-Reply-To: <20260924100855.2734089-1-hch@lst.de>
To check both the metadata integrity and file system checksums after
log replay.
Signed-off-by: Christoph Hellwig <hch@lst.de>
---
tests/xfs/2305 | 75 ++++++++++++++++++++++++++++++++++++++++++++++
tests/xfs/2305.out | 2 ++
2 files changed, 77 insertions(+)
create mode 100755 tests/xfs/2305
create mode 100644 tests/xfs/2305.out
diff --git a/tests/xfs/2305 b/tests/xfs/2305
new file mode 100755
index 000000000000..277f81c13887
--- /dev/null
+++ b/tests/xfs/2305
@@ -0,0 +1,75 @@
+#! /bin/bash
+# SPDX-License-Identifier: GPL-2.0
+# Copyright (c) 2017 Oracle, Inc. All Rights Reserved.
+#
+# FS QA Test No. 2305
+#
+# Copied from generic/475, with added xfs_scrub -x calls for each iteration to
+# verify the integrity of all file data and metadata.
+#
+# Test log recovery with repeated (simulated) disk failures. We kick
+# off fsstress on the scratch fs, then switch out the underlying device
+# with dm-error to see what happens when the disk goes down. Having
+# taken down the fs in this manner, remount it and repeat. This test
+# is a Good Enough (tm) simulation of our internal multipath failure
+# testing efforts.
+#
+. ./common/preamble
+_begin_fstest shutdown auto log metadata eio recoveryloop smoketest datacsum
+
+# Override the default cleanup function.
+_cleanup()
+{
+ _kill_fsstress
+ _dmerror_unmount
+ _dmerror_cleanup
+ cd /
+ rm -f $tmp.*
+}
+
+# Import common functions.
+. ./common/dmerror
+
+# Modify as appropriate.
+
+_require_scratch
+_require_dm_target error
+
+echo "Silence is golden."
+
+_scratch_mkfs >> $seqres.full 2>&1
+_require_metadata_journaling $SCRATCH_DEV
+_dmerror_init
+_dmerror_mount
+
+while _soak_loop_running $((50 * TIME_FACTOR)); do
+ _run_fsstress_bg -d $SCRATCH_MNT -n 999999 -p $((LOAD_FACTOR * 4))
+
+ # purposely include 0 second sleeps to test shutdown immediately after
+ # recovery
+ sleep $((RANDOM % 3))
+
+ # This test aims to simulate sudden disk failure, which means that we
+ # do not want to quiesce the filesystem or otherwise give it a chance
+ # to flush its logs. Therefore we want to call dmsetup with the
+ # --nolockfs parameter; to make this happen we must call the load
+ # error table helper *without* 'lockfs'.
+ _dmerror_load_error_table
+
+ _kill_fsstress
+
+ # Mount again to replay log after loading working table, so we have a
+ # consistent XFS after test.
+ _dmerror_unmount || _fail "unmount failed"
+ _dmerror_load_working_table
+ _dmerror_mount || _fail "mount failed"
+
+ $XFS_SCRUB_PROG -x $SCRATCH_MNT >> $seqres.full 2>&1
+ if [ $? -ne 0 ]; then
+ _fail "scrub found errors"
+ fi
+done
+
+# success, all done
+status=0
+exit
diff --git a/tests/xfs/2305.out b/tests/xfs/2305.out
new file mode 100644
index 000000000000..8265227294ca
--- /dev/null
+++ b/tests/xfs/2305.out
@@ -0,0 +1,2 @@
+QA output created by 2305
+Silence is golden.
--
2.53.0
next prev parent reply other threads:[~2026-09-24 10:09 UTC|newest]
Thread overview: 45+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-24 10:07 xfstests support for RT data checksums Christoph Hellwig
2026-09-24 10:07 ` [PATCH 01/13] add a "datacsum" group Christoph Hellwig
2026-09-29 1:31 ` Darrick J. Wong
2026-10-05 13:17 ` Christoph Hellwig
2026-09-24 10:07 ` [PATCH 02/13] common: add a SCRATCH_MKFS_OPTIONS variable Christoph Hellwig
2026-09-29 1:32 ` Darrick J. Wong
2026-10-05 13:18 ` Christoph Hellwig
2026-09-24 10:07 ` [PATCH 03/13] xfs: add a XFS_VERIFY_FILE_DATA variable Christoph Hellwig
2026-09-29 1:34 ` Darrick J. Wong
2026-09-24 10:07 ` [PATCH 04/13] xfs/206: filter out csum information from mkfs output Christoph Hellwig
2026-09-29 1:34 ` Darrick J. Wong
2026-09-24 10:07 ` [PATCH 05/13] xfs: add a _require_xfs_data_csum helper Christoph Hellwig
2026-09-29 1:38 ` Darrick J. Wong
2026-10-05 13:20 ` Christoph Hellwig
2026-10-05 14:48 ` Darrick J. Wong
2026-10-05 14:55 ` Christoph Hellwig
2026-09-24 10:07 ` [PATCH 06/13] xfs/2301: test lazy bounce buffering mode Christoph Hellwig
2026-09-29 1:42 ` Darrick J. Wong
2026-10-05 13:21 ` Christoph Hellwig
2026-09-24 10:07 ` [PATCH 07/13] xfs/2302: add a basic data checksum test Christoph Hellwig
2026-09-29 1:48 ` Darrick J. Wong
2026-10-05 13:22 ` Christoph Hellwig
2026-09-24 10:07 ` [PATCH 08/13] xfs/2303: test that data checksums detect data misplacement Christoph Hellwig
2026-09-29 1:54 ` Darrick J. Wong
2026-10-05 13:23 ` Christoph Hellwig
2026-09-24 10:07 ` [PATCH 09/13] xfs/2304: version of generic/388 that run xfs_scrub -x for each iteration Christoph Hellwig
2026-09-29 1:56 ` Darrick J. Wong
2026-10-05 13:25 ` Christoph Hellwig
2026-10-05 14:51 ` Darrick J. Wong
2026-10-05 14:56 ` Christoph Hellwig
2026-10-05 15:20 ` Darrick J. Wong
2026-10-07 13:42 ` Christoph Hellwig
2026-10-07 15:19 ` Darrick J. Wong
2026-09-24 10:07 ` Christoph Hellwig [this message]
2026-09-29 1:57 ` [PATCH 10/13] xfs/2305: version of generic/475 " Darrick J. Wong
2026-10-05 13:25 ` Christoph Hellwig
2026-09-24 10:07 ` [PATCH 11/13] xfs/2306: test mkfs input validation for RT data csum options Christoph Hellwig
2026-09-29 1:59 ` Darrick J. Wong
2026-10-05 13:26 ` Christoph Hellwig
2026-09-24 10:07 ` [PATCH 12/13] xfs/2307: test checksum handling using corrupted checksums Christoph Hellwig
2026-09-29 2:05 ` Darrick J. Wong
2026-10-05 13:27 ` Christoph Hellwig
2026-09-24 10:07 ` [PATCH 13/13] xfs/2308: test rebuilding of csum files in xfs_repair Christoph Hellwig
2026-09-29 2:03 ` Darrick J. Wong
2026-10-05 13:27 ` Christoph Hellwig
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260924100855.2734089-11-hch@lst.de \
--to=hch@lst.de \
--cc=djwong@kernel.org \
--cc=fstests@vger.kernel.org \
--cc=linux-xfs@vger.kernel.org \
--cc=zlang@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox