* Re: [PATCH] hwe_regmatch: match error
[not found] <OF7CB3362D.2C97E5BB-ON4825805E.00108B17-4825805E.0010903E@LocalDomain>
@ 2016-11-01 3:12 ` tang.junhui
2016-11-01 16:05 ` Benjamin Marzinski
0 siblings, 1 reply; 5+ messages in thread
From: tang.junhui @ 2016-11-01 3:12 UTC (permalink / raw)
To: Christophe Varoqui; +Cc: zhang.kai16, tang.junhui, dm-devel, huang.wei56
[-- Attachment #1.1: Type: text/plain, Size: 1756 bytes --]
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.wei56@zte.com.cn wrote:
> From: "wei.huang" <huang.wei56@zte.com.cn>
>
> 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 <huang.wei56@zte.com.cn>
> ---
> 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 <hare@suse.com>
Cheers,
Hannes
--
Dr. Hannes Reinecke Teamlead Storage &
Networking
hare@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)
[-- Attachment #1.2: Type: text/html, Size: 4729 bytes --]
[-- Attachment #2: Type: text/plain, Size: 0 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] hwe_regmatch: match error
2016-11-01 3:12 ` [PATCH] hwe_regmatch: match error tang.junhui
@ 2016-11-01 16:05 ` Benjamin Marzinski
2016-11-03 13:44 ` Christophe Varoqui
0 siblings, 1 reply; 5+ messages in thread
From: Benjamin Marzinski @ 2016-11-01 16:05 UTC (permalink / raw)
To: tang.junhui; +Cc: dm-devel, huang.wei56, zhang.kai16
On Tue, Nov 01, 2016 at 11:12:46AM +0800, tang.junhui@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.wei56@zte.com.cn wrote:
> > From: "wei.huang" <huang.wei56@zte.com.cn>
> >
> > 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 <huang.wei56@zte.com.cn>
> > ---
> > 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 <hare@suse.com>
>
> Cheers,
>
> Hannes
> --
> Dr. Hannes Reinecke Teamlead Storage &
> Networking
> hare@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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] hwe_regmatch: match error
2016-11-01 16:05 ` Benjamin Marzinski
@ 2016-11-03 13:44 ` Christophe Varoqui
0 siblings, 0 replies; 5+ messages in thread
From: Christophe Varoqui @ 2016-11-03 13:44 UTC (permalink / raw)
To: Benjamin Marzinski
Cc: zhang.kai16, device-mapper development, huang.wei56, tang.junhui
[-- Attachment #1.1: Type: text/plain, Size: 2378 bytes --]
Merged.
Thanks.
On Tue, Nov 1, 2016 at 5:05 PM, Benjamin Marzinski <bmarzins@redhat.com>
wrote:
> On Tue, Nov 01, 2016 at 11:12:46AM +0800, tang.junhui@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.wei56@zte.com.cn wrote:
> > > From: "wei.huang" <huang.wei56@zte.com.cn>
> > >
> > > 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 <huang.wei56@zte.com.cn>
> > > ---
> > > 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 <hare@suse.com>
> >
> > Cheers,
> >
> > Hannes
> > --
> > Dr. Hannes Reinecke Teamlead
> Storage &
> > Networking
> > hare@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)
>
[-- Attachment #1.2: Type: text/html, Size: 3835 bytes --]
[-- Attachment #2: Type: text/plain, Size: 0 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] hwe_regmatch: match error
2016-10-14 2:03 huang.wei56
@ 2016-10-14 6:00 ` Hannes Reinecke
0 siblings, 0 replies; 5+ messages in thread
From: Hannes Reinecke @ 2016-10-14 6:00 UTC (permalink / raw)
To: huang.wei56, Christophe Varoqui; +Cc: zhang.kai16, dm-devel, tang.junhui
On 10/14/2016 04:03 AM, huang.wei56@zte.com.cn wrote:
> From: "wei.huang" <huang.wei56@zte.com.cn>
>
> 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 <huang.wei56@zte.com.cn>
> ---
> 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 <hare@suse.com>
Cheers,
Hannes
--
Dr. Hannes Reinecke Teamlead Storage & Networking
hare@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)
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH] hwe_regmatch: match error
@ 2016-10-14 2:03 huang.wei56
2016-10-14 6:00 ` Hannes Reinecke
0 siblings, 1 reply; 5+ messages in thread
From: huang.wei56 @ 2016-10-14 2:03 UTC (permalink / raw)
To: Christophe Varoqui; +Cc: tang.junhui, wei.huang, zhang.kai16, dm-devel
From: "wei.huang" <huang.wei56@zte.com.cn>
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 <huang.wei56@zte.com.cn>
---
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)) &&
--
2.8.1.windows.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2016-11-03 13:44 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <OF7CB3362D.2C97E5BB-ON4825805E.00108B17-4825805E.0010903E@LocalDomain>
2016-11-01 3:12 ` [PATCH] hwe_regmatch: match error tang.junhui
2016-11-01 16:05 ` Benjamin Marzinski
2016-11-03 13:44 ` Christophe Varoqui
2016-10-14 2:03 huang.wei56
2016-10-14 6:00 ` Hannes Reinecke
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.