All of lore.kernel.org
 help / color / mirror / Atom feed
From: Josef Bacik <josef@toxicpanda.com>
To: fstests@vger.kernel.org, linux-btrfs@vger.kernel.org, kernel-team@fb.com
Subject: [PATCH] fstests: UDEV_SETTLE_PROG before dmsetup create
Date: Wed,  1 Dec 2021 13:18:52 -0500	[thread overview]
Message-ID: <ebf63c27065c5fa676701184501353a9f2014832.1638382705.git.josef@toxicpanda.com> (raw)

We've been seeing transient errors with any test that uses a dm device
for the entirety of the time that we've been running nightly xfstests
runs.  This turns out to be because sometimes we get EBUSY while trying
to create our new dm device.  Generally this is because the test comes
right after another test that messes with the dm device, and thus we
still have udev messing around with the device when DM tries to O_EXCL
the block device.

Add a UDEV_SETTLE_PROG before creating the device to make sure we can
create our new dm device without getting this transient error.

Signed-off-by: Josef Bacik <josef@toxicpanda.com>
---
 common/rc | 1 +
 1 file changed, 1 insertion(+)

diff --git a/common/rc b/common/rc
index 8e351f17..35e861ec 100644
--- a/common/rc
+++ b/common/rc
@@ -4567,6 +4567,7 @@ _dmsetup_remove()
 
 _dmsetup_create()
 {
+	$UDEV_SETTLE_PROG >/dev/null 2>&1
 	$DMSETUP_PROG create "$@" >>$seqres.full 2>&1 || return 1
 	$DMSETUP_PROG mknodes >/dev/null 2>&1
 	$UDEV_SETTLE_PROG >/dev/null 2>&1
-- 
2.26.3


             reply	other threads:[~2021-12-01 18:18 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-01 18:18 Josef Bacik [this message]
2021-12-02 14:45 ` [PATCH] fstests: UDEV_SETTLE_PROG before dmsetup create Filipe Manana
2021-12-02 15:45   ` Josef Bacik
2021-12-06  5:47     ` Chandan Babu R
2021-12-06 14:07       ` Chandan Babu R
2021-12-06 19:28         ` Josef Bacik

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=ebf63c27065c5fa676701184501353a9f2014832.1638382705.git.josef@toxicpanda.com \
    --to=josef@toxicpanda.com \
    --cc=fstests@vger.kernel.org \
    --cc=kernel-team@fb.com \
    --cc=linux-btrfs@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.