From: Darrick J. Wong Date: Thu, 4 Jun 2026 06:04:52 +0000 (-0700) Subject: xfs_scrub_all: fix broken command line string array construction X-Git-Tag: v7.1.0~65 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=ff0aeb2332002d9fa514364af1b2cd40d97e0eb4;p=xfsprogs-dev.git xfs_scrub_all: fix broken command line string array construction In scrub_subprocess::__init__(), we construct cmd as an array of strings to be passed (eventually) to exec. Unfortunately, adding a string to an array of strings doesn't do what you'd think in Python: >>> x = ['moo', 'cow'] >>> x += '-x' >>> x ['moo', 'cow', '-', 'x'] Fix this problem, which Codex has sharp enough eyes to catch. Cc: linux-xfs@vger.kernel.org # v6.10.0 Fixes: a290edcfa0a391 ("xfs_scrub_all: encapsulate all the subprocess code in an object") Signed-off-by: "Darrick J. Wong" Reviewed-by: Andrey Albershteyn --- diff --git a/scrub/xfs_scrub_all.py.in b/scrub/xfs_scrub_all.py.in index 3f618587..9afb7993 100644 --- a/scrub/xfs_scrub_all.py.in +++ b/scrub/xfs_scrub_all.py.in @@ -100,7 +100,7 @@ class scrub_subprocess(scrub_control): else: cmd += '@scrub_args@'.split() if scrub_media: - cmd += '-x' + cmd += ['-x'] cmd += [mnt] self.cmdline = cmd self.proc = None