diff mbox

[10/17] xfs/179: use scratch device helpers

Message ID 146914483981.11762.15707981777571396710.stgit@birch.djwong.org (mailing list archive)
State Accepted
Headers show

Commit Message

Darrick J. Wong July 21, 2016, 11:47 p.m. UTC
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>
---
 tests/xfs/179 |   10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

Comments

Christoph Hellwig Aug. 1, 2016, 6:28 a.m. UTC | #1
On Thu, Jul 21, 2016 at 04:47:19PM -0700, Darrick J. Wong wrote:
> 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>

Looks fine,

Reviewed-by: Christoph Hellwig <hch@lst.de>
diff mbox

Patch

diff --git a/tests/xfs/179 b/tests/xfs/179
index e0b0af8..18459cb 100755
--- a/tests/xfs/179
+++ b/tests/xfs/179
@@ -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