Re: [dm-devel] [PATCH] hwe_regmatch: match error
Merged. Thanks. On Tue, Nov 1, 2016 at 5:05 PM, Benjamin Marzinski wrote: > On Tue, Nov 01, 2016 at 11:12:46AM +0800, tang.jun...@zte.com.cn wrote: > >Hello Christophe, > > ACK > > -Ben > > > > >This issue affects the accuracy of regular matching, > >and the patch bellow had been reviewed by Hannes, > >Can you merge it to Opensvc? > > > >Thanks > >Tang > > > >On 10/14/2016 04:03 AM, huang.we...@zte.com.cn wrote: > >> From: "wei.huang" > >> > >> Problem: > >> when we configure a device like vendor, product, revision all null > in > >multipath.conf, hwe_regmatch always return 0. > >> > >> Reasons: > >> \!hwe2->vendor, \!hwe2->product and \!hwe2->revision are all true. > >> > >> Signed-off-by: wei.huang > >> --- > >> libmultipath/config.c | 3 ++- > >> 1 file changed, 2 insertions(+), 1 deletion(-) > >> > >> diff --git a/libmultipath/config.c b/libmultipath/config.c > >> index a48b8af..d99cd75 100644 > >> --- a/libmultipath/config.c > >> +++ b/libmultipath/config.c > >> @@ -80,7 +80,8 @@ hwe_regmatch (struct hwentry *hwe1, struct hwentry > >*hwe2) > >> regcomp(&rre, hwe1->revision, > >REG_EXTENDED|REG_NOSUB)) > >>goto out_pre; > >> > >> - if ((!hwe1->vendor || !hwe2->vendor || > >> + if ((hwe2->vendor || hwe2->product || > hwe2->revision) > >&& > >> + (!hwe1->vendor || !hwe2->vendor || > >>!regexec(&vre, hwe2->vendor, 0, NULL, 0)) && > >> (!hwe1->product || !hwe2->product || > >>!regexec(&pre, hwe2->product, 0, NULL, 0)) && > >> > >Good point. > > > >Reviewed-by: Hannes Reinecke > > > >Cheers, > > > >Hannes > >-- > >Dr. Hannes Reinecke Teamlead > Storage & > >Networking > >h...@suse.de > > > +49 911 74053 688 > >SUSE LINUX GmbH, Maxfeldstr. 5, 90409 N��rnberg > >GF: F. Imend?rffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton > >HRB 21284 (AG N��rnberg) > -- dm-devel mailing list dm-devel@redhat.com https://www.redhat.com/mailman/listinfo/dm-devel
Re: [dm-devel] [PATCH] hwe_regmatch: match error
On Tue, Nov 01, 2016 at 11:12:46AM +0800, tang.jun...@zte.com.cn wrote: >Hello Christophe, ACK -Ben > >This issue affects the accuracy of regular matching, >and the patch bellow had been reviewed by Hannes, >Can you merge it to Opensvc? > >Thanks >Tang > >On 10/14/2016 04:03 AM, huang.we...@zte.com.cn wrote: >> From: "wei.huang" >> >> Problem: >> when we configure a device like vendor, product, revision all null in >multipath.conf, hwe_regmatch always return 0. >> >> Reasons: >> \!hwe2->vendor, \!hwe2->product and \!hwe2->revision are all true. >> >> Signed-off-by: wei.huang >> --- >> libmultipath/config.c | 3 ++- >> 1 file changed, 2 insertions(+), 1 deletion(-) >> >> diff --git a/libmultipath/config.c b/libmultipath/config.c >> index a48b8af..d99cd75 100644 >> --- a/libmultipath/config.c >> +++ b/libmultipath/config.c >> @@ -80,7 +80,8 @@ hwe_regmatch (struct hwentry *hwe1, struct hwentry >*hwe2) >> regcomp(&rre, hwe1->revision, >REG_EXTENDED|REG_NOSUB)) >> goto out_pre; >> >> - if ((!hwe1->vendor || !hwe2->vendor || >> + if ((hwe2->vendor || hwe2->product || hwe2->revision) >&& >> + (!hwe1->vendor || !hwe2->vendor || >> !regexec(&vre, hwe2->vendor, 0, NULL, 0)) && >> (!hwe1->product || !hwe2->product || >> !regexec(&pre, hwe2->product, 0, NULL, 0)) && >> >Good point. > >Reviewed-by: Hannes Reinecke > >Cheers, > >Hannes >-- >Dr. Hannes Reinecke Teamlead Storage & >Networking >h...@suse.de > +49 911 74053 688 >SUSE LINUX GmbH, Maxfeldstr. 5, 90409 N��rnberg >GF: F. Imend?rffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton >HRB 21284 (AG N��rnberg) -- dm-devel mailing list dm-devel@redhat.com https://www.redhat.com/mailman/listinfo/dm-devel
Re: [dm-devel] [PATCH] hwe_regmatch: match error
Hello Christophe, This issue affects the accuracy of regular matching, and the patch bellow had been reviewed by Hannes, Can you merge it to Opensvc? Thanks Tang On 10/14/2016 04:03 AM, huang.we...@zte.com.cn wrote: > From: "wei.huang" > > Problem: > when we configure a device like vendor, product, revision all null in multipath.conf, hwe_regmatch always return 0. > > Reasons: > \!hwe2->vendor, \!hwe2->product and \!hwe2->revision are all true. > > Signed-off-by: wei.huang > --- > libmultipath/config.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/libmultipath/config.c b/libmultipath/config.c > index a48b8af..d99cd75 100644 > --- a/libmultipath/config.c > +++ b/libmultipath/config.c > @@ -80,7 +80,8 @@ hwe_regmatch (struct hwentry *hwe1, struct hwentry *hwe2) >regcomp(&rre, hwe1->revision, REG_EXTENDED|REG_NOSUB)) >goto out_pre; > > - if ((!hwe1->vendor || !hwe2->vendor || > + if ((hwe2->vendor || hwe2->product || hwe2->revision) && > + (!hwe1->vendor || !hwe2->vendor || > !regexec(&vre, hwe2->vendor, 0, NULL, 0)) && >(!hwe1->product || !hwe2->product || > !regexec(&pre, hwe2->product, 0, NULL, 0)) && > Good point. Reviewed-by: Hannes Reinecke Cheers, Hannes -- Dr. Hannes Reinecke Teamlead Storage & Networking h...@suse.de +49 911 74053 688 SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg GF: F. Imend?rffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton HRB 21284 (AG Nürnberg) -- dm-devel mailing list dm-devel@redhat.com https://www.redhat.com/mailman/listinfo/dm-devel
Re: [dm-devel] [PATCH] hwe_regmatch: match error
On 10/14/2016 04:03 AM, huang.we...@zte.com.cn wrote: > From: "wei.huang" > > Problem: > when we configure a device like vendor, product, revision all null in > multipath.conf, hwe_regmatch always return 0. > > Reasons: > \!hwe2->vendor, \!hwe2->product and \!hwe2->revision are all true. > > Signed-off-by: wei.huang > --- > libmultipath/config.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/libmultipath/config.c b/libmultipath/config.c > index a48b8af..d99cd75 100644 > --- a/libmultipath/config.c > +++ b/libmultipath/config.c > @@ -80,7 +80,8 @@ hwe_regmatch (struct hwentry *hwe1, struct hwentry *hwe2) > regcomp(&rre, hwe1->revision, REG_EXTENDED|REG_NOSUB)) > goto out_pre; > > - if ((!hwe1->vendor || !hwe2->vendor || > + if ((hwe2->vendor || hwe2->product || hwe2->revision) && > + (!hwe1->vendor || !hwe2->vendor || >!regexec(&vre, hwe2->vendor, 0, NULL, 0)) && > (!hwe1->product || !hwe2->product || >!regexec(&pre, hwe2->product, 0, NULL, 0)) && > Good point. Reviewed-by: Hannes Reinecke Cheers, Hannes -- Dr. Hannes ReineckeTeamlead Storage & Networking h...@suse.de +49 911 74053 688 SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg GF: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton HRB 21284 (AG Nürnberg) -- dm-devel mailing list dm-devel@redhat.com https://www.redhat.com/mailman/listinfo/dm-devel