diff mbox series

common/rc: fix dumping of corrupt ext* filesystems

Message ID 20250407235931.GB6274@frogsfrogsfrogs (mailing list archive)
State New
Headers show
Series common/rc: fix dumping of corrupt ext* filesystems | expand

Commit Message

Darrick J. Wong April 7, 2025, 11:59 p.m. UTC
From: Darrick J. Wong <djwong@kernel.org>

The parameters to _ext4_metadump are device, dumpfile, and compress
options.  This callsite got the arguments in the wrong order, which
causes fstests to compress all of /dev/sdX as /dev/sdX.zst which is not
what we want.

Cc: <fstests@vger.kernel.org> # v2022.05.01
Fixes: 9fb30a9500c169 ("common: capture qcow2 dumps of corrupt ext* filesystems")
Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
---
 common/rc |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Zorro Lang April 8, 2025, 7:52 p.m. UTC | #1
On Mon, Apr 07, 2025 at 04:59:31PM -0700, Darrick J. Wong wrote:
> From: Darrick J. Wong <djwong@kernel.org>
> 
> The parameters to _ext4_metadump are device, dumpfile, and compress
> options.  This callsite got the arguments in the wrong order, which
> causes fstests to compress all of /dev/sdX as /dev/sdX.zst which is not
> what we want.
> 
> Cc: <fstests@vger.kernel.org> # v2022.05.01
> Fixes: 9fb30a9500c169 ("common: capture qcow2 dumps of corrupt ext* filesystems")
> Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
> ---

Reviewed-by: Zorro Lang <zlang@redhat.com>

>  common/rc |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/common/rc b/common/rc
> index b2155d37a90d68..a71c15986efd18 100644
> --- a/common/rc
> +++ b/common/rc
> @@ -3552,7 +3552,7 @@ _check_generic_filesystem()
>          case "$FSTYP" in
>          ext*)
>              local flatdev="$(basename "$device")"
> -            _ext4_metadump "$seqres.$flatdev.check.qcow2" "$device" compress
> +            _ext4_metadump "$device" "$seqres.$flatdev.check.qcow2" compress
>              ;;
>          esac
>      fi
>
diff mbox series

Patch

diff --git a/common/rc b/common/rc
index b2155d37a90d68..a71c15986efd18 100644
--- a/common/rc
+++ b/common/rc
@@ -3552,7 +3552,7 @@  _check_generic_filesystem()
         case "$FSTYP" in
         ext*)
             local flatdev="$(basename "$device")"
-            _ext4_metadump "$seqres.$flatdev.check.qcow2" "$device" compress
+            _ext4_metadump "$device" "$seqres.$flatdev.check.qcow2" compress
             ;;
         esac
     fi