All of lore.kernel.org
 help / color / mirror / Atom feed
From: bxue@redhat.com
To: fstests@vger.kernel.org
Cc: Boyang Xue <bxue@redhat.com>
Subject: [PATCH v2 1/2] common/dmthin: call $UDEV_SETTLE_PROG before 'dmsetup remove'
Date: Wed, 18 Jan 2017 17:27:23 +0800	[thread overview]
Message-ID: <1484731644-7453-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


             reply	other threads:[~2017-01-18  9:27 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-18  9:27 bxue [this message]
2017-01-18  9:27 ` [PATCH v2 2/2] generic/405: test mkfs against thin provision device bxue
  -- strict thread matches above, loose matches on Subject: below --
2017-01-18  9:21 [PATCH v2 1/2] common/dmthin: call $UDEV_SETTLE_PROG before 'dmsetup remove' 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=1484731644-7453-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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.