From: Boyang Xue <bxue@xxxxxxxxxx> Wait for device to be fully settled so that 'dmsetup remove' doesn't fail due to EBUSY. Signed-off-by: Boyang Xue <bxue@xxxxxxxxxx> --- common/dmthin | 3 +++ 1 file changed, 3 insertions(+) diff --git a/common/dmthin b/common/dmthin index 3cd206a..e774175 100644 --- a/common/dmthin +++ b/common/dmthin @@ -38,6 +38,9 @@ DMTHIN_VOL_DEV="/dev/mapper/$DMTHIN_VOL_NAME" _dmthin_cleanup() { $UMOUNT_PROG $SCRATCH_MNT > /dev/null 2>&1 + # wait for device to be fully settled so that 'dmsetup remove' doesn't + # fail due to EBUSY + $UDEV_SETTLE_PROG >/dev/null 2>&1 $DMSETUP_PROG remove $DMTHIN_VOL_NAME> /dev/null 2>&1 $DMSETUP_PROG remove $DMTHIN_POOL_NAME> /dev/null 2>&1 $DMSETUP_PROG remove $DMTHIN_META_NAME> /dev/null 2>&1 -- 1.8.3.1 -- To unsubscribe from this list: send the line "unsubscribe fstests" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html