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
+3 -3
View File
@@ -63,7 +63,7 @@ populate()
done
echo "flushing changes via umount/mount."
umount $SCRATCH_DEV
_scratch_unmount
_scratch_mount
}
@@ -91,7 +91,7 @@ allocate()
}
# real QA test starts here
umount $SCRATCH_DEV 2>/dev/null
_scratch_unmount 2>/dev/null
_scratch_mount
# see if faststart is possible (and requested)
@@ -100,7 +100,7 @@ faststart=""
if [ -n "$FASTSTART" -a -f $SCRATCH_MNT/f0 ]; then
faststart="-N" # causes us to skip the mkfs step
fi
umount $SCRATCH_DEV
_scratch_unmount
_scratch_mkfs_xfs -dsize=160m,agcount=4 $faststart | _filter_mkfs 2>$tmp.mkfs
cat $tmp.mkfs >>$seqres.full