btrfs: make sure we rescan all devices after unregistering
[xfstests-dev.git] / tests / btrfs / 219
index 78fca03560e06fd2876449c8f7392c1af9429fec..bff6003e27be2df417c2df0959b005fabd41c4e8 100755 (executable)
@@ -35,6 +35,7 @@ _cleanup()
        [ ! -z "$fs_img1" ] && rm -rf $fs_img1
        [ ! -z "$fs_img2" ] && rm -rf $fs_img2
        [ ! -z "$loop_dev" ] && _destroy_loop_device $loop_dev
+       _btrfs_rescan_devices
 }
 
 # get standard environment, filters and checks
@@ -97,6 +98,7 @@ _mount $loop_dev $loop_mnt > /dev/null 2>&1 || \
 _mount -o loop $fs_img2 $loop_mnt1 > /dev/null 2>&1 && \
        _fail "We were allowed to mount when we should have failed"
 
+_btrfs_rescan_devices
 # success, all done
 echo "Silence is golden"
 status=0