From: "Benjamin Marzinski" <bmarzins@redhat.com>
To: Martin Wilck <mwilck@suse.com>
Cc: dm-devel@redhat.com
Subject: Re: [PATCH] 11-dm-mpath.rules: dont't run "multipath -U" during coldplug
Date: Thu, 12 Apr 2018 14:52:06 -0500 [thread overview]
Message-ID: <20180412195206.GY3103@octiron.msp.redhat.com> (raw)
In-Reply-To: <20180406114521.4883-1-mwilck@suse.com>
On Fri, Apr 06, 2018 at 01:45:21PM +0200, Martin Wilck wrote:
> When udevadm trigger is run after switching root, lots of simultaneous uevents
> for both path and multipath devices arrive. In may happen that when "multipath
> -U" is called on a dm device, the path's uevents haven't finished yet, thus
> the paths aren't found in the udev db, and multipath -U erroneously concludes
> that there are no usable paths. Avoid that by skipping "multipath -U" during
> coldplug.
>
Reviewed-by: Benjamin Marzinski <bmarzins@redhat.com>
> Fixes: "ce5ea6a 11-dm-mpath.rules: multipath -U for READY check"
> Signed-off-by: Martin Wilck <mwilck@suse.com>
> ---
> multipath/11-dm-mpath.rules | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/multipath/11-dm-mpath.rules b/multipath/11-dm-mpath.rules
> index 03ac5da..07320a1 100644
> --- a/multipath/11-dm-mpath.rules
> +++ b/multipath/11-dm-mpath.rules
> @@ -26,6 +26,10 @@ ENV{DM_NR_VALID_PATHS}=="0", ENV{MPATH_DEVICE_READY}="0", GOTO="mpath_action"
> ENV{MPATH_SBIN_PATH}="/sbin"
> TEST!="$env{MPATH_SBIN_PATH}/multipath", ENV{MPATH_SBIN_PATH}="/usr/sbin"
>
> +# Don't run multipath -U during "coldplug" after switching root,
> +# because paths are just being added to the udev db.
> +ACTION=="add", ENV{.MPATH_DEVICE_READY_OLD}=="1", GOTO="paths_ok"
> +
> # Check the map state directly with multipath -U.
> # This doesn't attempt I/O on the device.
> PROGRAM=="$env{MPATH_SBIN_PATH}/multipath -U %k", GOTO="paths_ok"
> --
> 2.16.1
prev parent reply other threads:[~2018-04-12 19:52 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-06 11:45 [PATCH] 11-dm-mpath.rules: dont't run "multipath -U" during coldplug Martin Wilck
2018-04-12 19:52 ` Benjamin Marzinski [this message]
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=20180412195206.GY3103@octiron.msp.redhat.com \
--to=bmarzins@redhat.com \
--cc=dm-devel@redhat.com \
--cc=mwilck@suse.com \
/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