public inbox for fstests@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] generic/085: Call $UDEV_SETTLE_PROG before "dmsetup remove"
@ 2018-06-26 10:59 Xiao Yang
  2018-06-27  7:54 ` Dave Chinner
  0 siblings, 1 reply; 6+ messages in thread
From: Xiao Yang @ 2018-06-26 10:59 UTC (permalink / raw)
  To: fstests; +Cc: guaneryu, Xiao Yang

cleanup_dmdev() may fail to remove dm device because of EBUSY
and cause subsequent tests to fail.  Make sure dm device is
fully settled before removing it.

PS: I am not sure whether calling "dmsetup remove --retry" is
better or not.

Signed-off-by: Xiao Yang <yangx.jy@cn.fujitsu.com>
---
 tests/generic/085 | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/tests/generic/085 b/tests/generic/085
index bed1e0d..bdc4dba 100755
--- a/tests/generic/085
+++ b/tests/generic/085
@@ -32,6 +32,9 @@ cleanup_dmdev()
 	$DMSETUP_PROG resume $lvdev >/dev/null 2>&1
 	$UMOUNT_PROG $lvdev >/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 $node >>$seqres.full 2>&1
 	$DMSETUP_PROG mknodes >/dev/null 2>&1
 }
-- 
1.8.3.1




^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2018-06-28  1:58 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-06-26 10:59 [PATCH] generic/085: Call $UDEV_SETTLE_PROG before "dmsetup remove" Xiao Yang
2018-06-27  7:54 ` Dave Chinner
2018-06-27 10:54   ` [PATCH v2] common: Add _dmsetup_create and _dmsetup_remove helpers Xiao Yang
2018-06-27 12:10     ` David Sterba
2018-06-28  1:45       ` [PATCH v3] " Xiao Yang
2018-06-28  1:42     ` [PATCH v2] " Xiao Yang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox