misc: replace more open-coded _scratch_xfs_db calls
authorDarrick J. Wong <djwong@kernel.org>
Wed, 14 Apr 2021 01:05:07 +0000 (18:05 -0700)
committerEryu Guan <guaneryu@gmail.com>
Sun, 18 Apr 2021 12:53:53 +0000 (20:53 +0800)
Replace the last remaining open-coded calls to xfs_db for the scratch
device with calls to _scratch_xfs_db.  This fixes these tests when
external logs are enabled.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
common/repair
tests/xfs/030
tests/xfs/083

index 8adc2178a728ebe531eb0f010ace2ed70e3e903a..5a957f4ec81c51e0e62bf9c23c2922769731ad0e 100644 (file)
@@ -10,7 +10,7 @@ _zero_position()
        struct="$2"
 
        # set values for off/len variables provided by db
-       eval `xfs_db -r -c "$struct" -c stack $SCRATCH_DEV | perl -ne '
+       eval `_scratch_xfs_db -r -c "$struct" -c stack | perl -ne '
                if (/byte offset (\d+), length (\d+)/) {
                        print "offset=$1\nlength=$2\n"; exit
                }'`
index 906d9019e3e0aa532590da6f978f8fb9aae6b618..81198155c60248b57e77a7d8f94bdbcd09590f6b 100755 (executable)
@@ -81,7 +81,7 @@ else
        _scratch_unmount
 fi
 clear=""
-eval `xfs_db -r -c "sb 1" -c stack $SCRATCH_DEV | perl -ne '
+eval `_scratch_xfs_db -r -c "sb 1" -c stack | perl -ne '
        if (/byte offset (\d+), length (\d+)/) {
                print "clear=", $1 / 512, "\n"; exit
        }'`
index a548be2a34b7b67e7a2dc24ee711b970ca189227..a3f32cb7b743e0348411d682ffac54239f90246a 100755 (executable)
@@ -108,7 +108,7 @@ echo "+ check fs" >> $seqres.full
 _scratch_xfs_repair >> $seqres.full 2>&1 || _fail "should pass initial fsck"
 
 echo "++ corrupt image" >> $seqres.full
-xfs_db -x -c blockget -c "blocktrash ${FUZZ_ARGS}" "${SCRATCH_DEV}" >> $seqres.full 2>&1
+_scratch_xfs_db -x -c blockget -c "blocktrash ${FUZZ_ARGS}" >> $seqres.full 2>&1
 
 echo "++ mount image" >> $seqres.full
 _try_scratch_mount >> $seqres.full 2>&1