From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Benjamin Marzinski" Subject: Re: [PATCH 50/78] Allow zero-sized devices during configuration Date: Thu, 26 Mar 2015 22:56:09 -0500 Message-ID: <20150327035609.GR29132@octiron.msp.redhat.com> References: <1426509425-15978-1-git-send-email-hare@suse.de> <1426509425-15978-51-git-send-email-hare@suse.de> Reply-To: device-mapper development Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <1426509425-15978-51-git-send-email-hare@suse.de> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dm-devel-bounces@redhat.com Errors-To: dm-devel-bounces@redhat.com To: Hannes Reinecke Cc: dm-devel@redhat.com, Christophe Varoqui List-Id: dm-devel.ids On Mon, Mar 16, 2015 at 01:36:37PM +0100, Hannes Reinecke wrote: > A size of '0' doesn't indicate an invalid device; other paths might > end up with a correct size. don't we also need to change this is ev_add_path, then? -Ben > > Signed-off-by: Hannes Reinecke > --- > libmultipath/configure.c | 11 ++++++----- > 1 file changed, 6 insertions(+), 5 deletions(-) > > diff --git a/libmultipath/configure.c b/libmultipath/configure.c > index 2c10c22..ddbd3ed 100644 > --- a/libmultipath/configure.c > +++ b/libmultipath/configure.c > @@ -768,8 +768,8 @@ coalesce_paths (struct vectors * vecs, vector newmp, char * refwwid, int force_r > continue; > > /* 3. if path has disappeared */ > - if (!pp1->size) { > - orphan_path(pp1, "invalid size"); > + if (pp1->state == PATH_REMOVED) { > + orphan_path(pp1, "path removed"); > continue; > } > > @@ -806,10 +806,11 @@ coalesce_paths (struct vectors * vecs, vector newmp, char * refwwid, int force_r > if (strcmp(pp1->wwid, pp2->wwid)) > continue; > > - if (!pp2->size) > - continue; > + if (!mpp->size && pp2->size) > + mpp->size = pp2->size; > > - if (pp2->size != mpp->size) { > + if (mpp->size && pp2->size && > + pp2->size != mpp->size) { > /* > * ouch, avoid feeding that to the DM > */ > -- > 1.8.4.5