This test, btrfs/027, runs tests against different raid profiles in
a loop, if one of them aborts, it also fails the following ones with
errors like,
Test -m raid10 -d raid10
ERROR: /dev/xxx is mounted
Test -m raid5 -d raid5
ERROR: /dev/xxx is mounted
Test -m raid6 -d raid6
ERROR: /dev/xxx is mounted
_scratch_unmount is added to avoid the above.
Signed-off-by: Liu Bo <bo.li.liu@oracle.com>
Reviewed-by: Eryu Guan <eguan@redhat.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
$SCRATCH_MNT >>$seqres.full 2>&1
if [ $? -ne 0 ]; then
echo "btrfs replace failed"
+ _scratch_unmount
_spare_dev_put
_scratch_dev_pool_put
return
$BTRFS_UTIL_PROG scrub start -B $SCRATCH_MNT >>$seqres.full 2>&1
if [ $? -ne 0 ]; then
echo "btrfs scrub failed"
+ _scratch_unmount
_spare_dev_put
_scratch_dev_pool_put
return