local compressopt="$4"
shift; shift; shift; shift
local options="$@"
- test -z "$options" && options="-a -o"
if [ "$logdev" != "none" ]; then
options="$options -l $logdev"
if [ "$ok" -ne 1 ] && [ "$DUMP_CORRUPT_FS" = "1" ]; then
local flatdev="$(basename "$device")"
_xfs_metadump "$seqres.$flatdev.check.md" "$device" "$logdev" \
- compress >> $seqres.full
+ compress -a -o >> $seqres.full
fi
# Optionally test the index rebuilding behavior.
if [ "$rebuild_ok" -ne 1 ] && [ "$DUMP_CORRUPT_FS" = "1" ]; then
local flatdev="$(basename "$device")"
_xfs_metadump "$seqres.$flatdev.rebuild.md" "$device" \
- "$logdev" compress >> $seqres.full
+ "$logdev" compress -a -o >> $seqres.full
fi
fi
if [ "$orebuild_ok" -ne 1 ] && [ "$DUMP_CORRUPT_FS" = "1" ]; then
local flatdev="$(basename "$device")"
_xfs_metadump "$seqres.$flatdev.orebuild.md" "$device" \
- "$logdev" compress >> $seqres.full
+ "$logdev" compress -a -o >> $seqres.full
fi
fi
# Yes they can! Now...
# Can xfs_metadump cope with this monster?
-_scratch_xfs_metadump $tmp.metadump || _fail "xfs_metadump failed"
+_scratch_xfs_metadump $tmp.metadump -a -o || _fail "xfs_metadump failed"
SCRATCH_DEV=$tmp.img _scratch_xfs_mdrestore $tmp.metadump || _fail "xfs_mdrestore failed"
SCRATCH_DEV=$tmp.img _scratch_xfs_repair -f &>> $seqres.full || \
_fail "xfs_repair of metadump failed"
echo "Create metadump file"
_scratch_unmount
-_scratch_xfs_metadump $metadump_file
+_scratch_xfs_metadump $metadump_file -a
# Now restore the obfuscated one back and take a look around
echo "Restore metadump"
test -n "$extlen" || _notrun "could not create dir extent > 1000 blocks"
echo "Try to metadump"
-_scratch_xfs_metadump $metadump_file -w
+_scratch_xfs_metadump $metadump_file -a -o -w
SCRATCH_DEV=$metadump_img _scratch_xfs_mdrestore $metadump_file
echo "Check restored metadump image"
copy_file=$testdir/copy.img
echo metadump
-_scratch_xfs_metadump $metadump_file >> $seqres.full
+_scratch_xfs_metadump $metadump_file -a -o >> $seqres.full
echo metadump a
_scratch_xfs_metadump $metadump_file_a -a >> $seqres.full