]> git.apps.os.sepia.ceph.com Git - xfstests-dev.git/commitdiff
xfs/129: fix post-metadump remounting idiocy
authorDarrick J. Wong <darrick.wong@oracle.com>
Thu, 21 Jul 2016 23:47:07 +0000 (16:47 -0700)
committerEryu Guan <eguan@redhat.com>
Fri, 5 Aug 2016 02:32:10 +0000 (10:32 +0800)
Use the standard _scratch_mount to mount the filesystem from the
restored image, instead of trying to call mount directly. This is
needed in case we had custom mount options (like rtdev).

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>
tests/xfs/129

index d29f842dfbd950433e487ba5ad37e3489e2c0ba9..17ff2388843d07f3fccfeb24e7b18c054002407c 100755 (executable)
@@ -34,7 +34,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
 _cleanup()
 {
     cd /
-    umount $SCRATCH_MNT > /dev/null 2>&1
+    _scratch_unmount > /dev/null 2>&1
     rm -rf $tmp.* $testdir $metadump_file $TEST_DIR/image
 }
 
@@ -76,8 +76,8 @@ _scratch_metadump $metadump_file
 # Now restore the obfuscated one back and take a look around
 echo "Restore metadump"
 xfs_mdrestore $metadump_file $TEST_DIR/image
-_mount -t $FSTYP $TEST_DIR/image $SCRATCH_MNT
-umount $SCRATCH_MNT
+SCRATCH_DEV=$TEST_DIR/image _scratch_mount
+SCRATCH_DEV=$TEST_DIR/image _scratch_unmount
 
 echo "Check restored fs"
 _check_generic_filesystem $metadump_file