* [PATCHSET] fstests: fixes for autonomous self healing of filesystems
@ 2026-03-16 23:28 Darrick J. Wong
2026-03-16 23:29 ` [PATCH 1/3] common: ignore stderr for the two new svcname helpers Darrick J. Wong
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Darrick J. Wong @ 2026-03-16 23:28 UTC (permalink / raw)
To: zlang, djwong; +Cc: linux-xfs, fstests
Hi all,
These are miscellaneous bug fixes for the queued-up self healing
fstests.
If you're going to start using this code, I strongly recommend pulling
from my git trees, which are linked below.
With a bit of luck, this should all go splendidly.
Comments and questions are, as always, welcome.
--D
fstests git tree:
https://git.kernel.org/cgit/linux/kernel/git/djwong/xfstests-dev.git/log/?h=health-monitoring-fixes
---
Commits in this patchset:
* common: ignore stderr for the two new svcname helpers
* xfs/6{59-61}: force xfs_healer to run
* xfs/805: adjust for new autofsck fsproperty defaults
---
common/xfs | 4 ++--
tests/xfs/659 | 3 +++
tests/xfs/660 | 3 +++
tests/xfs/661 | 4 ++++
tests/xfs/805 | 7 +------
tests/xfs/805.out | 1 -
6 files changed, 13 insertions(+), 9 deletions(-)
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 1/3] common: ignore stderr for the two new svcname helpers
2026-03-16 23:28 [PATCHSET] fstests: fixes for autonomous self healing of filesystems Darrick J. Wong
@ 2026-03-16 23:29 ` Darrick J. Wong
2026-03-18 6:01 ` Christoph Hellwig
2026-03-16 23:29 ` [PATCH 2/3] xfs/6{59-61}: force xfs_healer to run Darrick J. Wong
2026-03-16 23:29 ` [PATCH 3/3] xfs/805: adjust for new autofsck fsproperty defaults Darrick J. Wong
2 siblings, 1 reply; 7+ messages in thread
From: Darrick J. Wong @ 2026-03-16 23:29 UTC (permalink / raw)
To: zlang, djwong; +Cc: linux-xfs, fstests
From: Darrick J. Wong <djwong@kernel.org>
If either utility doesn't support the --svcname switch, ignore the
error output and just return an empty string.
Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
---
common/xfs | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/common/xfs b/common/xfs
index f276325df8fbac..7d7afbb5160951 100644
--- a/common/xfs
+++ b/common/xfs
@@ -2311,7 +2311,7 @@ _xfs_healer() {
# This is easy because xfs_healer has always supported --svcname.
_xfs_healer_svcname()
{
- _xfs_healer --svcname "$@"
+ _xfs_healer --svcname "$@" 2>/dev/null
}
# Compute the xfs_scrub systemd service instance name for a given path. This
@@ -2320,7 +2320,7 @@ _xfs_scrub_svcname()
{
local ret
- if ret="$($XFS_SCRUB_PROG --svcname "$@")"; then
+ if ret="$($XFS_SCRUB_PROG --svcname "$@" 2>/dev/null)"; then
echo "$ret"
return 0
fi
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 2/3] xfs/6{59-61}: force xfs_healer to run
2026-03-16 23:28 [PATCHSET] fstests: fixes for autonomous self healing of filesystems Darrick J. Wong
2026-03-16 23:29 ` [PATCH 1/3] common: ignore stderr for the two new svcname helpers Darrick J. Wong
@ 2026-03-16 23:29 ` Darrick J. Wong
2026-03-18 6:01 ` Christoph Hellwig
2026-03-16 23:29 ` [PATCH 3/3] xfs/805: adjust for new autofsck fsproperty defaults Darrick J. Wong
2 siblings, 1 reply; 7+ messages in thread
From: Darrick J. Wong @ 2026-03-16 23:29 UTC (permalink / raw)
To: zlang, djwong; +Cc: linux-xfs, fstests
From: Darrick J. Wong <djwong@kernel.org>
Set the autofsck property so that xfs_healer actually runs on
filesystems with old feature sets. Since these tests are looking for
error reports that don't require backref metadata (media errors, file IO
errors, shutdowns) we needn't _notrun them.
Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
---
tests/xfs/659 | 3 +++
tests/xfs/660 | 3 +++
tests/xfs/661 | 4 ++++
3 files changed, 10 insertions(+)
diff --git a/tests/xfs/659 b/tests/xfs/659
index 6d17711a07b118..556c1991a3c467 100755
--- a/tests/xfs/659
+++ b/tests/xfs/659
@@ -26,6 +26,7 @@ _cleanup()
_require_scratch
_require_scrub
_require_command "$XFS_HEALER_PROG" "xfs_healer"
+_require_command "$XFS_PROPERTY_PROG" "xfs_property"
_require_dm_target error
_require_no_xfs_always_cow # no out of place writes
@@ -59,6 +60,8 @@ _scratch_mkfs >> $seqres.full
#
_scratch_mount
_require_xfs_scratch_non_zoned
+# Force xfs_healer to run even if there's no backref metadata
+$XFS_PROPERTY_PROG $SCRATCH_MNT set autofsck=check >> $seqres.full
_require_xfs_healer $SCRATCH_MNT
_scratch_unmount
diff --git a/tests/xfs/660 b/tests/xfs/660
index 214dfe1a15b130..962a2fc78353ff 100755
--- a/tests/xfs/660
+++ b/tests/xfs/660
@@ -25,6 +25,7 @@ _require_scratch
_require_scrub
_require_dm_target error
_require_command "$XFS_HEALER_PROG" "xfs_healer"
+_require_command "$XFS_PROPERTY_PROG" "xfs_property"
_require_xfs_io_command verifymedia
filter_healer() {
@@ -57,6 +58,8 @@ _scratch_mkfs >> $seqres.full
_scratch_mount
_require_xfs_scratch_non_zoned
_require_xfs_healer $SCRATCH_MNT
+# Force xfs_healer to run even if there's no backref metadata
+$XFS_PROPERTY_PROG $SCRATCH_MNT set autofsck=check >> $seqres.full
_scratch_unmount
_dmerror_init
diff --git a/tests/xfs/661 b/tests/xfs/661
index f3f74cfe582c51..45e095395365f5 100755
--- a/tests/xfs/661
+++ b/tests/xfs/661
@@ -16,10 +16,14 @@ _begin_fstest auto quick scrub eio selfhealing shutdown
_require_scratch_nocheck
_require_scrub
_require_command "$XFS_HEALER_PROG" "xfs_healer"
+_require_command "$XFS_PROPERTY_PROG" "xfs_property"
_scratch_mkfs >> $seqres.full
_scratch_mount
_require_xfs_healer $SCRATCH_MNT
+# Force xfs_healer to run even if there's no backref metadata
+$XFS_PROPERTY_PROG $SCRATCH_MNT set autofsck=check >> $seqres.full
+
$XFS_IO_PROG -f -c "pwrite -S 0x58 0 500k" -c "fsync" $victim >> $seqres.full
echo "Start healer and shut down"
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 3/3] xfs/805: adjust for new autofsck fsproperty defaults
2026-03-16 23:28 [PATCHSET] fstests: fixes for autonomous self healing of filesystems Darrick J. Wong
2026-03-16 23:29 ` [PATCH 1/3] common: ignore stderr for the two new svcname helpers Darrick J. Wong
2026-03-16 23:29 ` [PATCH 2/3] xfs/6{59-61}: force xfs_healer to run Darrick J. Wong
@ 2026-03-16 23:29 ` Darrick J. Wong
2026-03-18 6:01 ` Christoph Hellwig
2 siblings, 1 reply; 7+ messages in thread
From: Darrick J. Wong @ 2026-03-16 23:29 UTC (permalink / raw)
To: zlang, djwong; +Cc: linux-xfs, fstests
From: Darrick J. Wong <djwong@kernel.org>
Now that mkfs will set autofsck=repair for filesystems that have both
reverse space mappings and file parent pointers enabled, let's stop
testing the "no autofsck option at all" scenario to avoid problems with
older mkfs.
Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
---
tests/xfs/805 | 7 +------
tests/xfs/805.out | 1 -
2 files changed, 1 insertion(+), 7 deletions(-)
diff --git a/tests/xfs/805 b/tests/xfs/805
index ae8f8a1ab7cf44..cb57561a1bafd7 100755
--- a/tests/xfs/805
+++ b/tests/xfs/805
@@ -37,13 +37,9 @@ filter_inum()
}
testme() {
- local mkfs_args=('-f')
local value="$1"
test -n "$value" && value="=$value"
-
- if [ $# -gt 0 ]; then
- mkfs_args+=('-m' "autofsck$value")
- fi
+ local mkfs_args=('-f' '-m' "autofsck$value")
echo "testing ${mkfs_args[*]}" >> $seqres.full
@@ -54,7 +50,6 @@ testme() {
}
testme ''
-testme
testme none
testme check
testme optimize
diff --git a/tests/xfs/805.out b/tests/xfs/805.out
index 3d22f1b208e3e9..6224d70c4b1d7e 100644
--- a/tests/xfs/805.out
+++ b/tests/xfs/805.out
@@ -1,6 +1,5 @@
QA output created by 805
autofsck=repair
-failed to get attr xfs:autofsck on inode XXX: No data available
autofsck=none
autofsck=check
autofsck=optimize
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 1/3] common: ignore stderr for the two new svcname helpers
2026-03-16 23:29 ` [PATCH 1/3] common: ignore stderr for the two new svcname helpers Darrick J. Wong
@ 2026-03-18 6:01 ` Christoph Hellwig
0 siblings, 0 replies; 7+ messages in thread
From: Christoph Hellwig @ 2026-03-18 6:01 UTC (permalink / raw)
To: Darrick J. Wong; +Cc: zlang, linux-xfs, fstests
On Mon, Mar 16, 2026 at 04:29:03PM -0700, Darrick J. Wong wrote:
> From: Darrick J. Wong <djwong@kernel.org>
>
> If either utility doesn't support the --svcname switch, ignore the
> error output and just return an empty string.
Looks good:
Reviewed-by: Christoph Hellwig <hch@lst.de>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 2/3] xfs/6{59-61}: force xfs_healer to run
2026-03-16 23:29 ` [PATCH 2/3] xfs/6{59-61}: force xfs_healer to run Darrick J. Wong
@ 2026-03-18 6:01 ` Christoph Hellwig
0 siblings, 0 replies; 7+ messages in thread
From: Christoph Hellwig @ 2026-03-18 6:01 UTC (permalink / raw)
To: Darrick J. Wong; +Cc: zlang, linux-xfs, fstests
On Mon, Mar 16, 2026 at 04:29:19PM -0700, Darrick J. Wong wrote:
> From: Darrick J. Wong <djwong@kernel.org>
>
> Set the autofsck property so that xfs_healer actually runs on
> filesystems with old feature sets. Since these tests are looking for
> error reports that don't require backref metadata (media errors, file IO
> errors, shutdowns) we needn't _notrun them.
Looks good:
Reviewed-by: Christoph Hellwig <hch@lst.de>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 3/3] xfs/805: adjust for new autofsck fsproperty defaults
2026-03-16 23:29 ` [PATCH 3/3] xfs/805: adjust for new autofsck fsproperty defaults Darrick J. Wong
@ 2026-03-18 6:01 ` Christoph Hellwig
0 siblings, 0 replies; 7+ messages in thread
From: Christoph Hellwig @ 2026-03-18 6:01 UTC (permalink / raw)
To: Darrick J. Wong; +Cc: zlang, linux-xfs, fstests
On Mon, Mar 16, 2026 at 04:29:35PM -0700, Darrick J. Wong wrote:
> From: Darrick J. Wong <djwong@kernel.org>
>
> Now that mkfs will set autofsck=repair for filesystems that have both
> reverse space mappings and file parent pointers enabled, let's stop
> testing the "no autofsck option at all" scenario to avoid problems with
> older mkfs.
Looks good:
Reviewed-by: Christoph Hellwig <hch@lst.de>
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2026-03-18 6:01 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-16 23:28 [PATCHSET] fstests: fixes for autonomous self healing of filesystems Darrick J. Wong
2026-03-16 23:29 ` [PATCH 1/3] common: ignore stderr for the two new svcname helpers Darrick J. Wong
2026-03-18 6:01 ` Christoph Hellwig
2026-03-16 23:29 ` [PATCH 2/3] xfs/6{59-61}: force xfs_healer to run Darrick J. Wong
2026-03-18 6:01 ` Christoph Hellwig
2026-03-16 23:29 ` [PATCH 3/3] xfs/805: adjust for new autofsck fsproperty defaults Darrick J. Wong
2026-03-18 6:01 ` Christoph Hellwig
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox