mirror of
https://github.com/linux-apfs/apfstests.git
synced 2026-05-01 15:01:44 -07:00
common/dmthin: call $UDEV_SETTLE_PROG before 'dmsetup remove'
Wait for device to be fully settled so that 'dmsetup remove' doesn't fail due to EBUSY. Signed-off-by: Boyang Xue <bxue@redhat.com> Reviewed-by: Eryu Guan <eguan@redhat.com> Signed-off-by: Eryu Guan <eguan@redhat.com>
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user