Skip to contentSkip to conversation

common/rc: fix dumping of corrupt ext* filesystems

PATCH In review Darrick J. Wong 2 participants 2 messages Apr 7, 2025 – Apr 8, 2025

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 common/rc: fix dumping of corrupt ext* filesystems

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

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 <[email protected]> # v2022.05.01
Fixes 9fb30a9500c169 ("common: capture qcow2 dumps of corrupt ext* filesystems")
---
 common/rc |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
common/rc +1 -1
index b2155d37a90d68..a71c15986efd18 100644
@@ -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
Reviewed-by on v1 1/1
#1 lore raw
Quoted 11 lines · Darrick J. Wong

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

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 <[email protected]> # v2022.05.01
Fixes 9fb30a9500c169 ("common: capture qcow2 dumps of corrupt ext* filesystems")

---

Quoted 17 lines
 common/rc |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
common/rc +1 -1
index b2155d37a90d68..a71c15986efd18 100644
@@ -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