mirror of
https://github.com/linux-apfs/apfstests.git
synced 2026-05-01 15:01:44 -07:00
xfs/179: use scratch device helpers
Use the helper functions for scratch devices. This fixes a problem where xfs/179 fails when there's a realtime device. Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Eryu Guan <eguan@redhat.com>
This commit is contained in:
committed by
Eryu Guan
parent
b85dfac4ca
commit
7c848d24bb
+5
-5
@@ -65,7 +65,7 @@ _pwrite_byte 0x61 0 $blksz $testdir/file1 >> $seqres.full
|
||||
_cp_reflink $testdir/file1 $testdir/file2 >> $seqres.full
|
||||
|
||||
echo "Change reference count"
|
||||
umount $SCRATCH_MNT
|
||||
_scratch_unmount
|
||||
echo "set refcount to -4" >> $seqres.full
|
||||
$XFS_DB_PROG -x -c 'agf 0' -c 'addr refcntroot' -c 'write recs[1].refcount 4294967292' $SCRATCH_DEV >> $seqres.full
|
||||
echo "check refcount after setting to -4" >> $seqres.full
|
||||
@@ -80,7 +80,7 @@ _cp_reflink $testdir/file1 $testdir/file6 >> $seqres.full
|
||||
_cp_reflink $testdir/file1 $testdir/file7 >> $seqres.full
|
||||
|
||||
echo "Check scratch fs"
|
||||
umount $SCRATCH_MNT
|
||||
_scratch_unmount
|
||||
echo "check refcount after reflinking 5 more times" >> $seqres.full
|
||||
$XFS_DB_PROG -c 'agf 0' -c 'addr refcntroot' -c 'p recs[1]' $SCRATCH_DEV >> $seqres.full
|
||||
_scratch_mount >> $seqres.full
|
||||
@@ -91,7 +91,7 @@ _pwrite_byte 0x62 0 $blksz $testdir/file5 >> $seqres.full
|
||||
_pwrite_byte 0x62 0 $blksz $testdir/file7 >> $seqres.full
|
||||
|
||||
echo "Check scratch fs"
|
||||
umount $SCRATCH_MNT
|
||||
_scratch_unmount
|
||||
echo "check refcount after cowing 3 files" >> $seqres.full
|
||||
$XFS_DB_PROG -c 'agf 0' -c 'addr refcntroot' -c 'p recs[1]' $SCRATCH_DEV >> $seqres.full
|
||||
_scratch_mount >> $seqres.full
|
||||
@@ -100,10 +100,10 @@ echo "Remove reflinked files"
|
||||
rm -rf $testdir/file*
|
||||
|
||||
echo "Check scratch fs"
|
||||
umount $SCRATCH_MNT
|
||||
_scratch_unmount
|
||||
echo "check refcount after removing all files" >> $seqres.full
|
||||
$XFS_DB_PROG -c 'agf 0' -c 'addr refcntroot' -c 'p recs[1]' $SCRATCH_DEV >> $seqres.full
|
||||
$XFS_REPAIR_PROG -o force_geometry -n $SCRATCH_DEV >> $seqres.full 2>&1
|
||||
_scratch_xfs_repair -o force_geometry -n >> $seqres.full 2>&1
|
||||
res=$?
|
||||
if [ $res -eq 0 ]; then
|
||||
# If repair succeeds then format the device so that the post-test
|
||||
|
||||
Reference in New Issue
Block a user