From: bxue@redhat.com
To: fstests@vger.kernel.org
Cc: Boyang Xue <bxue@redhat.com>
Subject: [PATCH v1 1/2] common/dmthin: call $UDEV_SETTLE_PROG before 'dmsetup remove'
Date: Wed, 18 Jan 2017 13:48:29 +0800 [thread overview]
Message-ID: <1484718510-7433-1-git-send-email-bxue@redhat.com> (raw)
From: Boyang Xue <bxue@redhat.com>
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>
---
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
next reply other threads:[~2017-01-18 5:49 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-18 5:48 bxue [this message]
2017-01-18 5:48 ` [PATCH v1 2/2] generic/405: test mkfs against full thin provision device bxue
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1484718510-7433-1-git-send-email-bxue@redhat.com \
--to=bxue@redhat.com \
--cc=fstests@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox