common: use mount/umount helpers everywhere

Replace every explicit mount/umount of scratch or test devices with
helper functions. This allows the next patch to add in hooks to these
functions in order to set up & tear down overlayfs on every mount/umount

(also adds _test_unmount(), which didn't exist prior)

[Eryu Guan rebased the patch agains latest master and replaced more
mount/umount with helpers]

Signed-off-by: Eryu Guan <eguan@redhat.com>
Signed-off-by: Eric Sandeen <esandeen@redhat.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
This commit is contained in:
Eric Sandeen
2015-12-21 18:07:43 +11:00
committed by Dave Chinner
parent 4545386ca0
commit 27d077ec0b
136 changed files with 293 additions and 288 deletions
+2 -2
View File
@@ -60,7 +60,7 @@ do_test()
off_opts=$3
echo "*** umount"
umount $SCRATCH_MNT
_scratch_unmount
QINO_1=`xfs_db -c "sb 0" -c "p" $SCRATCH_DEV | \
grep $qino_1 | awk '{print $NF}'`
@@ -76,7 +76,7 @@ do_test()
xfs_quota -x -c "off -$off_opts" $SCRATCH_MNT
xfs_quota -x -c "remove -$off_opts" $SCRATCH_MNT
echo "*** umount"
umount $SCRATCH_MNT
_scratch_unmount
echo "*** Usage after quotarm ***"
xfs_db -c "inode $QINO_1" -c "p core.nblocks" $SCRATCH_DEV