Message ID | 20181011222707.3631-20-mwilck@suse.com (mailing list archive) |
---|---|
State | Not Applicable, archived |
Delegated to: | christophe varoqui |
Headers | show |
Series | libmultipath: checkers overhaul | expand |
On Fri, Oct 12, 2018 at 12:27:05AM +0200, Martin Wilck wrote: Reviewed-by: Benjamin Marzinski <bmarzins@redhat.com> > Signed-off-by: Martin Wilck <mwilck@suse.com> > --- > libmultipath/configure.c | 10 +++++++--- > 1 file changed, 7 insertions(+), 3 deletions(-) > > diff --git a/libmultipath/configure.c b/libmultipath/configure.c > index 09c3dcf2..ed3e30f5 100644 > --- a/libmultipath/configure.c > +++ b/libmultipath/configure.c > @@ -1020,14 +1020,18 @@ int coalesce_paths (struct vectors * vecs, vector newmp, char * refwwid, > } > } > vector_foreach_slot (pathvec, pp1, k) { > - int invalid = 0; > + int invalid; > /* skip this path for some reason */ > > /* 1. if path has no unique id or wwid blacklisted */ > + if (strlen(pp1->wwid) == 0) { > + orphan_path(pp1, "no WWID"); > + continue; > + } > + > conf = get_multipath_config(); > pthread_cleanup_push(put_multipath_config, conf); > - if (strlen(pp1->wwid) == 0 || filter_path(conf, pp1) > 0) > - invalid = 1; > + invalid = (filter_path(conf, pp1) > 0); > pthread_cleanup_pop(1); > if (invalid) { > orphan_path(pp1, "blacklisted"); > -- > 2.19.0 -- dm-devel mailing list dm-devel@redhat.com https://www.redhat.com/mailman/listinfo/dm-devel
diff --git a/libmultipath/configure.c b/libmultipath/configure.c index 09c3dcf2..ed3e30f5 100644 --- a/libmultipath/configure.c +++ b/libmultipath/configure.c @@ -1020,14 +1020,18 @@ int coalesce_paths (struct vectors * vecs, vector newmp, char * refwwid, } } vector_foreach_slot (pathvec, pp1, k) { - int invalid = 0; + int invalid; /* skip this path for some reason */ /* 1. if path has no unique id or wwid blacklisted */ + if (strlen(pp1->wwid) == 0) { + orphan_path(pp1, "no WWID"); + continue; + } + conf = get_multipath_config(); pthread_cleanup_push(put_multipath_config, conf); - if (strlen(pp1->wwid) == 0 || filter_path(conf, pp1) > 0) - invalid = 1; + invalid = (filter_path(conf, pp1) > 0); pthread_cleanup_pop(1); if (invalid) { orphan_path(pp1, "blacklisted");
Signed-off-by: Martin Wilck <mwilck@suse.com> --- libmultipath/configure.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-)