[dm-devel] [PATCH 05/10] mpath: don't wait for udev if all paths are down

Hannes Reinecke hare at suse.de
Sun Oct 30 13:46:08 UTC 2016


On 10/29/2016 04:55 AM, Benjamin Marzinski wrote:
> Normally multipath waits for udev to create a device before adding
> more paths, which could trigger a reload. But, if the first path
> discovered is not usable, you should add the next path right away.
>
> Signed-off-by: Benjamin Marzinski <bmarzins at redhat.com>
> ---
>  multipathd/main.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/multipathd/main.c b/multipathd/main.c
> index dbcaa03..15c957a 100644
> --- a/multipathd/main.c
> +++ b/multipathd/main.c
> @@ -715,7 +715,10 @@ ev_add_path (struct path * pp, struct vectors * vecs)
>  		goto fail; /* leave path added to pathvec */
>  	}
>  	mpp = find_mp_by_wwid(vecs->mpvec, pp->wwid);
> -	if (mpp && mpp->wait_for_udev) {
> +	if (mpp && mpp->wait_for_udev &&
> +	    (pathcount(mpp, PATH_UP) > 0 ||
> +	     (pathcount(mpp, PATH_GHOST) > 0 && pp->tpgs != TPGS_IMPLICIT))) {
> +		/* if wait_for_udev is set and valid paths exist */
>  		mpp->wait_for_udev = 2;
>  		orphan_path(pp, "waiting for create to complete");
>  		return 0;
>
Reviewed-by: Hannes Reinecke <hare at suse.com>

Cheers,

Hannes
-- 
Dr. Hannes Reinecke		      zSeries & Storage
hare at suse.de			      +49 911 74053 688
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: J. Hawn, J. Guild, F. Imendörffer, HRB 16746 (AG Nürnberg)




More information about the dm-devel mailing list