Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D7449C433EF for ; Fri, 5 Nov 2021 21:03:36 +0000 (UTC) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 658C860D07 for ; Fri, 5 Nov 2021 21:03:36 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 658C860D07 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=tempfail smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1636146215; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=vwLbgSUsqKHVAI5tJU1e1K22iVP18qBACqL3yFLQnuc=; b=UfEa8DJQax4ul/Un5NbGOa6d3q6qqe9lKjO4NZttys4EZZD2hFw4Fih2/e+cbf+sxICpXg f87MF9Tm1uRGkTBgtwgFMTE02xKvWrgT7sJzpavOdWTFWwz/GLC0ofVmv3XbSNW6fSW+eT WajUaYVc4C3jz002doeoS7LpEtsK3NI= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-560-QCS12h0nNKqK4511YQPaug-1; Fri, 05 Nov 2021 17:03:34 -0400 X-MC-Unique: QCS12h0nNKqK4511YQPaug-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 7C754806688; Fri, 5 Nov 2021 21:03:29 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C558CB2A60; Fri, 5 Nov 2021 21:03:28 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 6FF1C1806D03; Fri, 5 Nov 2021 21:03:27 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 1A5L3P1s024783 for ; Fri, 5 Nov 2021 17:03:25 -0400 Received: by smtp.corp.redhat.com (Postfix) id D817A10016F5; Fri, 5 Nov 2021 21:03:25 +0000 (UTC) Received: from octiron.msp.redhat.com (unknown [10.15.80.209]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 82413101E693; Fri, 5 Nov 2021 21:03:15 +0000 (UTC) Received: from octiron.msp.redhat.com (localhost.localdomain [127.0.0.1]) by octiron.msp.redhat.com (8.14.9/8.14.9) with ESMTP id 1A5L3CZJ012757; Fri, 5 Nov 2021 16:03:13 -0500 Received: (from bmarzins@localhost) by octiron.msp.redhat.com (8.14.9/8.14.9/Submit) id 1A5L3CRq012756; Fri, 5 Nov 2021 16:03:12 -0500 Date: Fri, 5 Nov 2021 16:03:12 -0500 From: Benjamin Marzinski To: Martin Wilck Message-ID: <20211105210311.GN19591@octiron.msp.redhat.com> References: <1634757322-6015-1-git-send-email-bmarzins@redhat.com> <1634757322-6015-6-git-send-email-bmarzins@redhat.com> <2a319ae1e5eba66db17ab6372c95ac81f75a92e2.camel@suse.com> MIME-Version: 1.0 In-Reply-To: <2a319ae1e5eba66db17ab6372c95ac81f75a92e2.camel@suse.com> User-Agent: Mutt/1.5.23 (2014-03-12) X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-loop: dm-devel@redhat.com Cc: "dm-devel@redhat.com" Subject: Re: [dm-devel] [PATCH 5/7] multipathd: fully initialize paths added by update_pathvec_from_dm X-BeenThere: dm-devel@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: device-mapper development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dm-devel-bounces@redhat.com Errors-To: dm-devel-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=dm-devel-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable On Thu, Nov 04, 2021 at 10:10:18PM +0000, Martin Wilck wrote: > On Wed, 2021-10-20 at 14:15 -0500, Benjamin Marzinski wrote: > > When paths are added by update_pathvec_from_dm(), udev may not have > > initialized them. This means that it's possible that they are > > supposed > > to be blacklisted by udev properties, but weren't.=A0 Also, in order to > > avoid doing potentially stalling IO, update_pathvec_from_dm() doesn't > > get all the path information in pathinfo(). These paths end up in the > > unexpected state of INIT_MISSING_UDEV or INIT_NEW, but with their mpp > > and wwid set. > >=20 > > If udev has already initialized the path, but multipathed wasn't > > monitoring it, the blacklist checks and wwid determination in > > update_pathvec_from_dm() will work correctly, so paths added by it > > are > > safe, but not completely initialized. The most likely reason why this > > would happen is if the path was manually removed from multipathd > > monitoring with "multipathd del path". >=20 > Not quite getting this - normally the path would be removed from maps, > too. Are you referring to the REMOVE_PATH_DELAY case? Yeah, but if the user then runs "multipath", it will add that no longer tracked path back to the multipath device. Like I said in 0/7, I'm not sure that how much we need to proatively try to initalize these paths, or if we can just ignore them on the grounds that sometimes when people shoot themselves in the foot, it hurts. -Ben >=20 >=20 > > The most common time when > > uninitialized paths would in be part of multipath devices is during > > boot, after the pivot root, but before the udev coldplug happens. > > These > > paths are not necessarily safe. It's possible that > > /etc/multipath.conf > > in the initramfs and regular filesystem differ, and they should now > > be > > either blacklisted by udev_property, or have a different wwid. > > However > > an "add" event should appear for them shortly. > >=20 > > Multipath now has a new state to deal with these devices, > > INIT_PARTIAL. > > Devices in this state are treated mostly like INIT_OK devices, but > > when "multipathd add path" is called or an add/change uevent happens > > on these devices, multipathd will finish initializing them, and > > remove > > them if necessary. > >=20 > > Signed-off-by: Benjamin Marzinski >=20 > Nice. Somehow in my mind the issue always look much more complex. > I like this, but I want to give it some testing before I finally ack > it. >=20 > Regards > Martin >=20 >=20 >=20 >=20 > > --- > > =A0libmultipath/structs.h=A0=A0=A0=A0 |=A0 6 +++++ > > =A0libmultipath/structs_vec.c |=A0 5 ++-- > > =A0multipathd/cli_handlers.c=A0 |=A0 4 ++++ > > =A0multipathd/main.c=A0=A0=A0=A0=A0=A0=A0=A0=A0 | 48 ++++++++++++++++++= ++++++++++++++++-- > > -- > > =A0multipathd/main.h=A0=A0=A0=A0=A0=A0=A0=A0=A0 |=A0 1 + > > =A05 files changed, 58 insertions(+), 6 deletions(-) > >=20 > > diff --git a/libmultipath/structs.h b/libmultipath/structs.h > > index d0b266b7..69409fd4 100644 > > --- a/libmultipath/structs.h > > +++ b/libmultipath/structs.h > > @@ -200,6 +200,12 @@ enum initialized_states { > > =A0=A0=A0=A0=A0=A0=A0=A0 * mapped by some multipath map because of map = reload > > failure. > > =A0=A0=A0=A0=A0=A0=A0=A0 */ > > =A0=A0=A0=A0=A0=A0=A0=A0INIT_REMOVED, > > +=A0=A0=A0=A0=A0=A0=A0/* > > +=A0=A0=A0=A0=A0=A0=A0 * INIT_PARTIAL: paths added by update_pathvec_fr= om_dm() will > > not > > +=A0=A0=A0=A0=A0=A0=A0 * be fully initialized. This will be handled whe= n an add or > > +=A0=A0=A0=A0=A0=A0=A0 * change uevent is received. > > +=A0=A0=A0=A0=A0=A0=A0 */ > > +=A0=A0=A0=A0=A0=A0=A0INIT_PARTIAL, > > =A0}; > > =A0 > > =A0enum prkey_sources { > > diff --git a/libmultipath/structs_vec.c b/libmultipath/structs_vec.c > > index fb26437a..1de9175e 100644 > > --- a/libmultipath/structs_vec.c > > +++ b/libmultipath/structs_vec.c > > @@ -194,6 +194,7 @@ bool update_pathvec_from_dm(vector pathvec, > > struct multipath *mpp, > > =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0} > > =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0condlog(2, "%s: adding n= ew > > path %s", > > =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= mpp->alias, pp->dev); > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0pp->initialized =3D > > INIT_PARTIAL; > > =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0store_path(pathvec, pp); > > =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0pp->tick =3D 1; > > =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0} > > @@ -392,12 +393,12 @@ extract_hwe_from_path(struct multipath * mpp) > > =A0=A0=A0=A0=A0=A0=A0=A0condlog(4, "%s: searching paths for valid hwe",= mpp->alias); > > =A0=A0=A0=A0=A0=A0=A0=A0/* doing this in two passes seems like paranoia= to me */ > > =A0=A0=A0=A0=A0=A0=A0=A0vector_foreach_slot(mpp->paths, pp, i) { > > -=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0if (pp->state =3D=3D PATH= _UP && > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0if (pp->state =3D=3D PATH= _UP && pp->initialized !=3D > > INIT_PARTIAL && > > =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 pp->initializ= ed !=3D INIT_REMOVED && pp->hwe) > > =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0goto done; > > =A0=A0=A0=A0=A0=A0=A0=A0} > > =A0=A0=A0=A0=A0=A0=A0=A0vector_foreach_slot(mpp->paths, pp, i) { > > -=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0if (pp->state !=3D PATH_U= P && > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0if ((pp->state !=3D PATH_= UP || pp->initialized =3D=3D > > INIT_PARTIAL) && > > =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 pp->initializ= ed !=3D INIT_REMOVED && pp->hwe) > > =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0goto done; > > =A0=A0=A0=A0=A0=A0=A0=A0} > > diff --git a/multipathd/cli_handlers.c b/multipathd/cli_handlers.c > > index 58b9916c..8d37431e 100644 > > --- a/multipathd/cli_handlers.c > > +++ b/multipathd/cli_handlers.c > > @@ -526,6 +526,10 @@ cli_add_path (void *v, struct strbuf *reply, > > void *data) > > =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0return 1; > > =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0} > > =A0 > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0if (pp->initialized =3D= =3D INIT_PARTIAL && > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 finish_path_ini= t(pp, vecs) < 0) > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0r= eturn 1; > > + > > =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0if (pp->mpp) > > =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0return 0; > > =A0=A0=A0=A0=A0=A0=A0=A0} else if (pp) { > > diff --git a/multipathd/main.c b/multipathd/main.c > > index cc4a4a5d..4b8e2cde 100644 > > --- a/multipathd/main.c > > +++ b/multipathd/main.c > > @@ -976,12 +976,19 @@ check_path_wwid_change(struct path *pp) > > =A0=A0=A0=A0=A0=A0=A0=A0return false; > > =A0} > > =A0 > > +/* > > + * uev_add_path can call uev_update_path, and uev_update_path can > > call > > + * uev_add_path > > + */ > > +static int uev_update_path (struct uevent *uev, struct vectors * > > vecs); > > + > > =A0static int > > =A0uev_add_path (struct uevent *uev, struct vectors * vecs, int > > need_do_map) > > =A0{ > > =A0=A0=A0=A0=A0=A0=A0=A0struct path *pp; > > =A0=A0=A0=A0=A0=A0=A0=A0int ret =3D 0, i; > > =A0=A0=A0=A0=A0=A0=A0=A0struct config *conf; > > +=A0=A0=A0=A0=A0=A0=A0bool partial_init =3D false; > > =A0 > > =A0=A0=A0=A0=A0=A0=A0=A0condlog(3, "%s: add path (uevent)", uev->kernel= ); > > =A0=A0=A0=A0=A0=A0=A0=A0if (strstr(uev->kernel, "..") !=3D NULL) { > > @@ -1000,7 +1007,10 @@ uev_add_path (struct uevent *uev, struct > > vectors * vecs, int need_do_map) > > =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0int r; > > =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0struct multipath *prev_= mpp =3D NULL; > > =A0 > > -=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0if (pp->initialized =3D= =3D INIT_REMOVED) { > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0if (pp->initialized =3D= =3D INIT_PARTIAL) { > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0p= artial_init =3D true; > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0g= oto out; > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0} else if (pp->initialize= d =3D=3D INIT_REMOVED) { > > =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0condlog(3, "%s: re-adding removed path", pp- > > >dev); > > =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0pp->initialized =3D INIT_NEW; > > =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0prev_mpp =3D pp->mpp; > > @@ -1110,6 +1120,8 @@ uev_add_path (struct uevent *uev, struct > > vectors * vecs, int need_do_map) > > =A0=A0=A0=A0=A0=A0=A0=A0} > > =A0out: > > =A0=A0=A0=A0=A0=A0=A0=A0lock_cleanup_pop(vecs->lock); > > +=A0=A0=A0=A0=A0=A0=A0if (partial_init) > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0return uev_update_path(ue= v, vecs); > > =A0=A0=A0=A0=A0=A0=A0=A0return ret; > > =A0} > > =A0 > > @@ -1405,6 +1417,25 @@ fail: > > =A0=A0=A0=A0=A0=A0=A0=A0return REMOVE_PATH_MAP_ERROR; > > =A0} > > =A0 > > +int > > +finish_path_init(struct path *pp, struct vectors * vecs) > > +{ > > +=A0=A0=A0=A0=A0=A0=A0int r; > > +=A0=A0=A0=A0=A0=A0=A0struct config *conf; > > + > > +=A0=A0=A0=A0=A0=A0=A0conf =3D get_multipath_config(); > > +=A0=A0=A0=A0=A0=A0=A0pthread_cleanup_push(put_multipath_config, conf); > > +=A0=A0=A0=A0=A0=A0=A0r =3D pathinfo(pp, conf, DI_ALL|DI_BLACKLIST); > > +=A0=A0=A0=A0=A0=A0=A0pthread_cleanup_pop(1); > > + > > +=A0=A0=A0=A0=A0=A0=A0if (r =3D=3D PATHINFO_OK) > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0return 0; > > + > > +=A0=A0=A0=A0=A0=A0=A0condlog(0, "%s: error fully initializing path, re= moving", pp- > > >dev); > > +=A0=A0=A0=A0=A0=A0=A0ev_remove_path(pp, vecs, 1); > > +=A0=A0=A0=A0=A0=A0=A0return -1; > > +} > > + > > =A0static int > > =A0uev_update_path (struct uevent *uev, struct vectors * vecs) > > =A0{ > > @@ -1443,7 +1474,7 @@ uev_update_path (struct uevent *uev, struct > > vectors * vecs) > > =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0} > > =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0/* Don't deal with othe= r types of failed > > initialization > > =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 * now. check_path will= handle it */ > > -=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0if (!strlen(pp->wwid)) > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0if (!strlen(pp->wwid) && = pp->initialized !=3D > > INIT_PARTIAL) > > =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0goto out; > > =A0 > > =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0strcpy(wwid, pp->wwid); > > @@ -1451,12 +1482,20 @@ uev_update_path (struct uevent *uev, struct > > vectors * vecs) > > =A0 > > =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0if (rc !=3D 0) > > =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0strcpy(pp->wwid, wwid); > > -=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0else if (strncmp(wwid, pp= ->wwid, WWID_SIZE) !=3D 0) { > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0else if (strlen(wwid) && > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 = strncmp(wwid, pp->wwid, WWID_SIZE) !=3D 0) { > > =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0condlog(0, "%s: path wwid changed from '%s' > > to '%s'", > > =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0uev->kernel, wwid, pp->wwid); > > =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0ev_remove_path(pp, vecs, 1); > > =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0needs_reinit =3D 1; > > =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0goto out; > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0} else if (pp->initialize= d =3D=3D INIT_PARTIAL) { > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0u= dev_device_unref(pp->udev); > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0p= p->udev =3D udev_device_ref(uev->udev); > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0i= f (finish_path_init(pp, vecs) < 0) { > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0retval =3D 1; > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0goto out; > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0} > > =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0} else { > > =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0udev_device_unref(pp->udev); > > =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0pp->udev =3D udev_device_ref(uev->udev); > > @@ -1507,6 +1546,7 @@ out: > > =A0 > > =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0condlog(0, "%s: spuriou= s uevent, path not found", > > uev->kernel); > > =A0=A0=A0=A0=A0=A0=A0=A0} > > +=A0=A0=A0=A0=A0=A0=A0/* pp->initalized must not be INIT_PARTIAL if nee= ds_reinit is > > set */ >=20 > Did you mean "cannot" here? At least for the "wwid changed" case this > is subtle, as it's set to INIT_REMOVED in ev_remove_path(). >=20 > > =A0=A0=A0=A0=A0=A0=A0=A0if (needs_reinit) > > =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0retval =3D uev_add_path= (uev, vecs, 1); > > =A0=A0=A0=A0=A0=A0=A0=A0return retval; > > @@ -2116,7 +2156,7 @@ check_path (struct vectors * vecs, struct path > > * pp, unsigned int ticks) > > =A0=A0=A0=A0=A0=A0=A0=A0int marginal_pathgroups, marginal_changed =3D 0= ; > > =A0=A0=A0=A0=A0=A0=A0=A0int ret; > > =A0 > > -=A0=A0=A0=A0=A0=A0=A0if (((pp->initialized =3D=3D INIT_OK || > > +=A0=A0=A0=A0=A0=A0=A0if (((pp->initialized =3D=3D INIT_OK || pp->initi= alized =3D=3D > > INIT_PARTIAL || > > =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 pp->initialized =3D=3D INIT_REQ= UESTED_UDEV) && !pp->mpp) || > > =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 pp->initialized =3D=3D INIT_REMOVED) > > =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0return 0; > > diff --git a/multipathd/main.h b/multipathd/main.h > > index c8a1ce92..4acd1b8c 100644 > > --- a/multipathd/main.h > > +++ b/multipathd/main.h > > @@ -66,4 +66,5 @@ int reload_and_sync_map(struct multipath *mpp, > > struct vectors *vecs, > > =A0 > > =A0void handle_path_wwid_change(struct path *pp, struct vectors *vecs); > > =A0bool check_path_wwid_change(struct path *pp); > > +int finish_path_init(struct path *pp, struct vectors * vecs); > > =A0#endif /* MAIN_H */ -- dm-devel mailing list dm-devel@redhat.com https://listman.redhat.com/mailman/listinfo/dm-devel