Skip to contentSkip to conversation

xfs_scrub_all: fix non-service-mode arguments to xfs_scrub

PATCH In review Darrick J. Wong 2 participants 2 messages Feb 2 – Feb 3

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xfs_scrub_all: fix non-service-mode arguments to xfs_scrub

From: Darrick J. Wong <[email protected]>

Back in commit 7da76e2745d6a7, we changed the default arguments to xfs_scrub for the xfs_scrub@ service to derive the fix/preen/check mode from the "autofsck" filesystem property instead of hardcoding "-p". Unfortunately, I forgot to make the same update for xfs_scrub_all being run from the CLI and directly invoking xfs_scrub.

Cc <[email protected]> # v6.10.0
Fixes 7da76e2745d6a7 ("xfs_scrub: use the autofsck fsproperty to select mode")
---
 scrub/Makefile            |    2 +-
 scrub/xfs_scrub_all.py.in |    3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)
scrub/Makefile +1 -1
index 6375d77a291bcb..ff79a265762332 100644
@@ -16,7 +16,7 @@ LTCOMMAND = xfs_scrub
 INSTALL_SCRUB = install-scrub
 XFS_SCRUB_ALL_PROG = xfs_scrub_all.py
 XFS_SCRUB_FAIL_PROG = xfs_scrub_fail
-XFS_SCRUB_ARGS = -p
+XFS_SCRUB_ARGS = -o autofsck
 XFS_SCRUB_SERVICE_ARGS = -b -o autofsck
 ifeq ($(HAVE_SYSTEMD),yes)
 INSTALL_SCRUB += install-systemd
scrub/xfs_scrub_all.py.in +2 -1
index ce251daea6a5d5..9f861639a43ce4 100644
@@ -102,7 +102,8 @@ class scrub_subprocess(scrub_control):
 		cmd = ['@sbindir@/xfs_scrub']
 		if 'SERVICE_MODE' in os.environ:
 			cmd += '@scrub_service_args@'.split()
-		cmd += '@scrub_args@'.split()
+		else:
+			cmd += '@scrub_args@'.split()
 		if scrub_media:
 			cmd += '-x'
 		cmd += [mnt]
Reviewed-by on v1 1/1
#1 lore raw
Quoted 7 lines · Darrick J. Wong

From: Darrick J. Wong <[email protected]>

Back in commit 7da76e2745d6a7, we changed the default arguments to xfs_scrub for the xfs_scrub@ service to derive the fix/preen/check mode from the "autofsck" filesystem property instead of hardcoding "-p". Unfortunately, I forgot to make the same update for xfs_scrub_all being run from the CLI and directly invoking xfs_scrub.

Looks good: