[dm-devel] [PATCH 19/94] multipath-tools: add Oracle FS to hwtable

2016-10-13 Thread tang . wenjun3
From: Xose Vazquez Perez 

Based on info from the manufacturer.
And also add ^ to Axiom.

Cc: Srinivasan Ramani 
Cc: Christophe Varoqui 
Cc: device-mapper development 
Signed-off-by: Xose Vazquez Perez 
---
 libmultipath/hwtable.c | 16 
 1 file changed, 12 insertions(+), 4 deletions(-)

diff --git a/libmultipath/hwtable.c b/libmultipath/hwtable.c
index e312a6f..ed6e02b 100644
--- a/libmultipath/hwtable.c
+++ b/libmultipath/hwtable.c
@@ -645,19 +645,27 @@ static struct hwentry default_hw[] = {
/*
 * Oracle
 */
-   {
/*
-* Pillar Data
+* Pillar Data / Oracle FS
 *
 * Maintainer : Srinivasan Ramani
 * Mail : srinivas.ram...@oracle.com
 */
-   .vendor= "Pillar",
-   .product   = "Axiom",
+   {
+   .vendor= "^Pillar",
+   .product   = "^Axiom",
+   .pgpolicy  = GROUP_BY_PRIO,
+   .pgfailback= -FAILBACK_IMMEDIATE,
+   .prio_name = PRIO_ALUA,
+   },
+   {
+   .vendor= "^Oracle",
+   .product   = "^Oracle FS",
.pgpolicy  = GROUP_BY_PRIO,
.pgfailback= -FAILBACK_IMMEDIATE,
.prio_name = PRIO_ALUA,
},
+   /* Sun - StorageTek */
{
.vendor= "STK",
.product   = "OPENstorage D280",
-- 
2.8.1.windows.1

--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel


[dm-devel] [PATCH 18/94] multipath-tools: SGI/TP9300 is a RDAC array

2016-10-13 Thread tang . wenjun3
From: Xose Vazquez Perez 

Confirmed by the original manufacturer(NetApp).

Cc: Sean Stewart 
Cc: Christophe Varoqui 
Cc: device-mapper development 
Signed-off-by: Xose Vazquez Perez 
---
 libmultipath/hwtable.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libmultipath/hwtable.c b/libmultipath/hwtable.c
index eda30f6..e312a6f 100644
--- a/libmultipath/hwtable.c
+++ b/libmultipath/hwtable.c
@@ -602,13 +602,13 @@ static struct hwentry default_hw[] = {
 */
{
.vendor= "SGI",
-   .product   = "TP9[13]00",
+   .product   = "TP9100",
.pgpolicy  = MULTIBUS,
.pgfailback= FAILBACK_UNDEF,
},
{
.vendor= "SGI",
-   .product   = "TP9[45]00",
+   .product   = "TP9[345]00",
.bl_product= "Universal Xport",
.hwhandler = "1 rdac",
.pgpolicy  = GROUP_BY_PRIO,
-- 
2.8.1.windows.1

--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel


[dm-devel] [PATCH 17/94] multipath-tools: replace "." for real values in (COMPAQ|HP)/"(MSA|HSV)1.0"

2016-10-13 Thread tang . wenjun3
From: Xose Vazquez Perez 

Exact devices are in drivers/scsi/scsi_dh.c

{"COMPAQ", "MSA1000 VOLUME","hp_sw" },
{"COMPAQ", "HSV110","hp_sw" },
{"HP", "HSV100","hp_sw"},

Cc: Hannes Reinecke 
Cc: Christophe Varoqui 
Cc: device-mapper development 
Signed-off-by: Xose Vazquez Perez 
---
 libmultipath/hwtable.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libmultipath/hwtable.c b/libmultipath/hwtable.c
index 9366829..eda30f6 100644
--- a/libmultipath/hwtable.c
+++ b/libmultipath/hwtable.c
@@ -70,7 +70,7 @@ static struct hwentry default_hw[] = {
{
/* MSA 1000/1500 and EVA 3000/5000, with old firmware */
.vendor= "(COMPAQ|HP)",
-   .product   = "(MSA|HSV)1.0",
+   .product   = "(MSA|HSV)1[01]0",
.features  = "1 queue_if_no_path",
.hwhandler = "1 hp_sw",
.pgpolicy  = GROUP_BY_PRIO,
-- 
2.8.1.windows.1

--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel


[dm-devel] [PATCH 24/94] multipath-tools: document vendor, product, revision and bl_product are POSIX Extended regex

2016-10-13 Thread tang . wenjun3
From: Xose Vazquez Perez 

Cc: Christophe Varoqui 
Cc: device-mapper development 
Signed-off-by: Xose Vazquez Perez 
---
 libmultipath/hwtable.c | 4 ++--
 multipath/multipath.conf.5 | 2 ++
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/libmultipath/hwtable.c b/libmultipath/hwtable.c
index 55ffc56..bb8be88 100644
--- a/libmultipath/hwtable.c
+++ b/libmultipath/hwtable.c
@@ -864,8 +864,8 @@ static struct hwentry default_hw[] = {
 *
 * Keep only mandatory and modified attributes.
 * Attributes with default values must be removed.
-* .vendor and .product are mandatory, all other are optional.
-* POSIX Extended regex can be used in .vendor, .product, .revision and 
.bl_product
+* Only .vendor and .product are mandatory, all other are optional.
+* .vendor, .product, .revision and .bl_product are POSIX Extended regex
 *
 * COMPANY_NAME
 *
diff --git a/multipath/multipath.conf.5 b/multipath/multipath.conf.5
index b34a320..8377d14 100644
--- a/multipath/multipath.conf.5
+++ b/multipath/multipath.conf.5
@@ -955,6 +955,8 @@ subsection.
 .
 .
 The \fIdevice\fR subsection recognizes the following attributes:
+.TP
+vendor, product, revision and product_blacklist are POSIX Extended regex.
 .TP 17
 .B vendor
 (Mandatory) Vendor identifier.
-- 
2.8.1.windows.1

--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel


[dm-devel] [PATCH 23/94] multipath-tools: remove patchwork reference

2016-10-13 Thread tang . wenjun3
From: Xose Vazquez Perez 

It is only for kernel dm patches.

Cc: Christophe Varoqui 
Cc: device-mapper development 
Signed-off-by: Xose Vazquez Perez 
---
 README | 1 -
 1 file changed, 1 deletion(-)

diff --git a/README b/README
index c1c53fc..77b79b8 100644
--- a/README
+++ b/README
@@ -25,6 +25,5 @@ To get latest devel code: git clone 
http://git.opensvc.com/multipath-tools/.git
 
 Mailing list: http://www.redhat.com/mailman/listinfo/dm-devel
 Gitweb: http://git.opensvc.com/?p=multipath-tools/.git
-Patchwork: http://patchwork.kernel.org/project/dm-devel/list/
 
 Current maintainer is Christophe Varoqui 
-- 
2.8.1.windows.1

--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel


[dm-devel] [PATCH 15/94] multipath-tools: replace (|) with [] when there is one element

2016-10-13 Thread tang . wenjun3
From: Xose Vazquez Perez 

Cc: Hannes Reinecke 
Cc: Christophe Varoqui 
Cc: device-mapper development 
Signed-off-by: Xose Vazquez Perez 
---
 libmultipath/hwtable.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libmultipath/hwtable.c b/libmultipath/hwtable.c
index bfe5df4..9a4ab6e 100644
--- a/libmultipath/hwtable.c
+++ b/libmultipath/hwtable.c
@@ -122,7 +122,7 @@ static struct hwentry default_hw[] = {
{
/* MSA 1040/2040 family */
.vendor= "HP",
-   .product   = "MSA (1|2)040 SA(N|S)",
+   .product   = "MSA [12]040 SA[NS]",
.pgpolicy  = GROUP_BY_PRIO,
.pgfailback= -FAILBACK_IMMEDIATE,
.no_path_retry = 18,
-- 
2.8.1.windows.1

--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel


[dm-devel] [PATCH 21/94] multipath-tools: standardize all RDAC devices

2016-10-13 Thread tang . wenjun3
From: Xose Vazquez Perez 

This is a combo patch.

Reorder keyworks as in code and manpage for "(NETAPP|LSI|ENGENIO)"/"INF-01-00",
and clone its configuration to ALL other RDAC devices.

There are only two differences in all rdac devices. And they look minor:
.features and .no_path_retry

 deviceskeyword  values
 =====   
  3 .features  = "1 queue_if_no_path",

  5 .no_path_retry = 15,
  1 .no_path_retry = 30,
  3 .no_path_retry = 300,
 10 .no_path_retry = NO_PATH_RETRY_QUEUE,

"queue_if_no_path" is identical to the "no_path_retry" keyword.
So "queue_if_no_path" can be replaced by "no_path_retry = XX"

And there are just six devices with:
  6 .features  = "2 pg_init_retries 50",

Sean Stewart, from NetApp, provided more detailed information:

"The pg_init_retries value should be good for all RDAC devices, and can be
synced, the no_path_retry should also be fine. I don’t think that there’s
necessarily an “ideal” value for it, and may be more of a user preference type
of thing, but I personally don’t see anything wrong with having that value on
all RDAC devices, as well. It’s easy enough to change in the conf file if an end
user needs a different value."

I think the pg_init_retries parameter is set as such because part of
scsi_dh_rdac’s path activation involves sending a Mode Select page 0x2C to
change the ownership. If the array is already processing one, it will return
with a vendor unique check condition (05/91/36), which returns SCSI_DH_RETRY."

As for the no_path_retry, we’ve seen scenarios where both paths can be
temporarily unavailable during a storage firmware upgrade, usually because udev
processing has not added the path from one controller before the path from the
second controller goes away. This is just to give it some time to settle in
cases like that, so I/O can continue. The value of 30 was suggested by my
predecessor, but I think is largely arbitrary."

Cc: Sean Stewart 
Cc: Benjamin Marzinski 
Cc: Hannes Reinecke 
Cc: Christophe Varoqui 
Cc: device-mapper development 
Signed-off-by: Xose Vazquez Perez 
---
 libmultipath/hwtable.c | 152 +++--
 1 file changed, 83 insertions(+), 69 deletions(-)

diff --git a/libmultipath/hwtable.c b/libmultipath/hwtable.c
index ed6e02b..6ab0ed6 100644
--- a/libmultipath/hwtable.c
+++ b/libmultipath/hwtable.c
@@ -224,37 +224,37 @@ static struct hwentry default_hw[] = {
.vendor= "DELL",
.product   = "MD3000",
.bl_product= "Universal Xport",
-   .features  = "2 pg_init_retries 50",
-   .hwhandler = "1 rdac",
.pgpolicy  = GROUP_BY_PRIO,
-   .pgfailback= -FAILBACK_IMMEDIATE,
-   .no_path_retry = 15,
.checker_name  = RDAC,
+   .features  = "2 pg_init_retries 50",
+   .hwhandler = "1 rdac",
.prio_name = PRIO_RDAC,
+   .pgfailback= -FAILBACK_IMMEDIATE,
+   .no_path_retry = 30,
},
{
.vendor= "DELL",
.product   = "(MD32xx|MD36xx)",
.bl_product= "Universal Xport",
-   .features  = "2 pg_init_retries 50",
-   .hwhandler = "1 rdac",
.pgpolicy  = GROUP_BY_PRIO,
-   .pgfailback= -FAILBACK_IMMEDIATE,
-   .no_path_retry = 15,
.checker_name  = RDAC,
+   .features  = "2 pg_init_retries 50",
+   .hwhandler = "1 rdac",
.prio_name = PRIO_RDAC,
+   .pgfailback= -FAILBACK_IMMEDIATE,
+   .no_path_retry = 30,
},
{
.vendor= "DELL",
.product   = "(MD34xx|MD38xx)",
.bl_product= "Universal Xport",
-   .features  = "2 pg_init_retries 50",
-   .hwhandler = "1 rdac",
.pgpolicy  = GROUP_BY_PRIO,
-   .pgfailback= -FAILBACK_IMMEDIATE,
-   .no_path_retry = 15,
.checker_name  = RDAC,
+   .features  = "2 pg_init_retries 50",
+   .hwhandler = "1 rdac",
.prio_name = PRIO_RDAC,
+   .pgfailback= -FAILBACK_IMMEDIATE,
+   .no_path_retry = 30,
},
/*
 * Fujitsu
@@ -320,112 +320,117 @@ static struct hwentry default_hw[] = {
.vendor= "IBM",
.product   = "^1722-600",
.bl_product= 

[dm-devel] [PATCH 22/94] multipath-tools: add IBM/1813 - DCS3860 to hwtable

2016-10-13 Thread tang . wenjun3
From: Xose Vazquez Perez 

It's a RDAC device, confirmed by the original manufacturer(NetApp).

Cc: Sean Stewart 
Cc: Hannes Reinecke 
Cc: Christophe Varoqui 
Cc: device-mapper development 
Signed-off-by: Xose Vazquez Perez 
---
 libmultipath/hwtable.c | 13 +
 1 file changed, 13 insertions(+)

diff --git a/libmultipath/hwtable.c b/libmultipath/hwtable.c
index 6ab0ed6..55ffc56 100644
--- a/libmultipath/hwtable.c
+++ b/libmultipath/hwtable.c
@@ -381,6 +381,19 @@ static struct hwentry default_hw[] = {
.no_path_retry = 30,
},
{
+   /* DCS3860 */
+   .vendor= "IBM",
+   .product   = "^1813",
+   .bl_product= "Universal Xport",
+   .pgpolicy  = GROUP_BY_PRIO,
+   .checker_name  = RDAC,
+   .features  = "2 pg_init_retries 50",
+   .hwhandler = "1 rdac",
+   .prio_name = PRIO_RDAC,
+   .pgfailback= -FAILBACK_IMMEDIATE,
+   .no_path_retry = 30,
+   },
+   {
/* DS3950 / DS4200 / DS4700 / DS5020 */
.vendor= "IBM",
.product   = "^1814",
-- 
2.8.1.windows.1

--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel


[dm-devel] [PATCH 12/94] multipath-tools: add support for all IBM Enterprise Storage Server / Shark family

2016-10-13 Thread tang . wenjun3
From: Xose Vazquez Perez 

Only F20 and 800 were included:
2105F20 IBM Enterprise Storage Server Model F20
2105800 IBM TotalStorage Enterprise Storage Server Model 800

Added all of them with just "^2105"
2105E10 IBM Enterprise Storage Server Model E10
2105E20 IBM Enterprise Storage Server Model E20
2105F10 IBM Enterprise Storage Server Model F10
2105750 IBM TotalStorage Enterprise Storage Server Model 750

Cc: Hannes Reinecke 
Cc: Christophe Varoqui 
Cc: device-mapper development 
Signed-off-by: Xose Vazquez Perez 
---
 libmultipath/hwtable.c | 12 ++--
 1 file changed, 2 insertions(+), 10 deletions(-)

diff --git a/libmultipath/hwtable.c b/libmultipath/hwtable.c
index 2192d38..1ecaf19 100644
--- a/libmultipath/hwtable.c
+++ b/libmultipath/hwtable.c
@@ -435,17 +435,9 @@ static struct hwentry default_hw[] = {
.pgfailback= FAILBACK_UNDEF,
},
{
-   /* Enterprise Storage Server / Shark 800 */
+   /* Enterprise Storage Server / Shark family */
.vendor= "IBM",
-   .product   = "^2105800",
-   .features  = "1 queue_if_no_path",
-   .pgpolicy  = GROUP_BY_SERIAL,
-   .pgfailback= FAILBACK_UNDEF,
-   },
-   {
-   /* Enterprise Storage Server / Shark F20 */
-   .vendor= "IBM",
-   .product   = "^2105F20",
+   .product   = "^2105",
.features  = "1 queue_if_no_path",
.pgpolicy  = GROUP_BY_SERIAL,
.pgfailback= FAILBACK_UNDEF,
-- 
2.8.1.windows.1

--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel


[dm-devel] [PATCH 14/94] multipath-tools: remove pgpolicy=FAILOVER from Ceph/RBD

2016-10-13 Thread tang . wenjun3
From: Xose Vazquez Perez 

It's already the default pgpolicy.

Cc: Mike Christie 
Cc: Christophe Varoqui 
Cc: device-mapper development 
Signed-off-by: Xose Vazquez Perez 
---
 libmultipath/hwtable.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/libmultipath/hwtable.c b/libmultipath/hwtable.c
index 01d3c53..bfe5df4 100644
--- a/libmultipath/hwtable.c
+++ b/libmultipath/hwtable.c
@@ -818,7 +818,6 @@ static struct hwentry default_hw[] = {
{
.vendor= "Ceph",
.product   = "RBD",
-   .pgpolicy  = FAILOVER,
.no_path_retry = NO_PATH_RETRY_FAIL,
.checker_name  = RBD,
.deferred_remove = DEFERRED_REMOVE_ON,
-- 
2.8.1.windows.1

--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel


[dm-devel] [PATCH 20/94] multipath-tools: remove blank line at multipath.conf.5

2016-10-13 Thread tang . wenjun3
From: Xose Vazquez Perez 

Cc: Christophe Varoqui 
Cc: device-mapper development 
Signed-off-by: Xose Vazquez Perez 
---
 multipath/multipath.conf.5 | 1 -
 1 file changed, 1 deletion(-)

diff --git a/multipath/multipath.conf.5 b/multipath/multipath.conf.5
index acc1f51..b34a320 100644
--- a/multipath/multipath.conf.5
+++ b/multipath/multipath.conf.5
@@ -814,7 +814,6 @@ Default value is: \fB30\fR
 .RE
 .
 .
-.
 .\" 

 .SH "blacklist section"
 .\" 

-- 
2.8.1.windows.1

--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel


[dm-devel] [PATCH] multipathd: "show map mpathx json" would cause realloc error possibly

2016-10-13 Thread tang . wenjun3
From: 10144149 

Problem: multipathd dead when we run "show map spathx json" command with
system messages as follows:
Oct 13 11:37:30 rhel7-1 multipathd: *** Error in `/sbin/multipathd': realloc(): 
invalid next size: 0x7f8cf8004210 ***
Oct 13 11:37:30 rhel7-1 multipathd: === Backtrace: =
Oct 13 11:37:30 rhel7-1 multipathd: /lib64/libc.so.6(+0x7bc67)[0x7f8d06171c67]
Oct 13 11:37:30 rhel7-1 multipathd: /lib64/libc.so.6(+0x7fb17)[0x7f8d06175b17]
Oct 13 11:37:30 rhel7-1 multipathd: 
/lib64/libc.so.6(realloc+0xd2)[0x7f8d06176702]

Reasons: in function snprint_multipath_fields_json
vector_foreach_slot (pgp->paths, pp, j) {
   fwd += snprint_path(buff + fwd, len - fwd, PRINT_JSON_PATH, pp, 0);
   if (fwd > len)
return fwd;

   fwd += snprint_json_elem_footer(buff + fwd,
len - fwd, 3, j + 1 == VECTOR_SIZE(pgp->paths));
   if (fwd > len)
   return fwd;
}

snprint_path (char * line, int len, char * format, struct path * pp, int pad)

when len - fwd = 0 , The len is not restricted in snprint_path,and the Memory 
of line is
rewritten in snprint_path, it cause realloc() failed , so fwd > len modify
fwd >= len.

Other commands also have this type of risk.

Signed-off-by: 10144149 
---
 libmultipath/print.c | 131 ++-
 1 file changed, 66 insertions(+), 65 deletions(-)

diff --git a/libmultipath/print.c b/libmultipath/print.c
index 9aa41ad..78c065f 100644
--- a/libmultipath/print.c
+++ b/libmultipath/print.c
@@ -1004,11 +1004,11 @@ snprint_multipath_topology (char * buff, int len, 
struct multipath * mpp,
c += sprintf(c, "%c[%dm", 0x1B, 0); /* bold off */
 
fwd += snprint_multipath(buff + fwd, len - fwd, style, mpp, 1);
-   if (fwd > len)
+   if (fwd >= len)
return len;
fwd += snprint_multipath(buff + fwd, len - fwd, PRINT_MAP_PROPS, mpp,
 1);
-   if (fwd > len)
+   if (fwd >= len)
return len;
 
if (!mpp->pg)
@@ -1022,7 +1022,7 @@ snprint_multipath_topology (char * buff, int len, struct 
multipath * mpp,
} else
strcpy(f, "`-+- " PRINT_PG_INDENT);
fwd += snprint_pathgroup(buff + fwd, len - fwd, fmt, pgp);
-   if (fwd > len)
+   if (fwd >= len)
return len;
 
vector_foreach_slot (pgp->paths, pp, i) {
@@ -1035,13 +1035,14 @@ snprint_multipath_topology (char * buff, int len, 
struct multipath * mpp,
else
strcpy(f, " `- " PRINT_PATH_INDENT);
fwd += snprint_path(buff + fwd, len - fwd, fmt, pp, 1);
-   if (fwd > len)
+   if (fwd >= len)
return len;
}
}
return fwd;
 }
 
+
 static int
 snprint_json (char * buff, int len, int indent, char *json_str)
 {
@@ -1049,7 +1050,7 @@ snprint_json (char * buff, int len, int indent, char 
*json_str)
 
for (i = 0; i < indent; i++) {
fwd += snprintf(buff + fwd, len - fwd, PRINT_JSON_INDENT);
-   if (fwd > len)
+   if (fwd >= len)
return fwd;
}
 
@@ -1063,7 +1064,7 @@ snprint_json_header (char * buff, int len)
int fwd = 0;
 
fwd +=  snprint_json(buff, len, 0, PRINT_JSON_START_ELEM);
-   if (fwd > len)
+   if (fwd >= len)
return fwd;
 
fwd +=  snprintf(buff + fwd, len  - fwd, PRINT_JSON_START_VERSION,
@@ -1078,7 +1079,7 @@ snprint_json_elem_footer (char * buff, int len, int 
indent, int last)
 
for (i = 0; i < indent; i++) {
fwd += snprintf(buff + fwd, len - fwd, PRINT_JSON_INDENT);
-   if (fwd > len)
+   if (fwd >= len)
return fwd;
}
 
@@ -1098,50 +1099,50 @@ snprint_multipath_fields_json (char * buff, int len,
struct pathgroup *pgp;
 
fwd += snprint_multipath(buff, len, PRINT_JSON_MAP, mpp, 0);
-   if (fwd > len)
+   if (fwd >= len)
return fwd;
 
fwd += snprint_json(buff + fwd, len - fwd, 2, PRINT_JSON_START_GROUPS);
-   if (fwd > len)
+   if (fwd >= len)
return fwd;
 
vector_foreach_slot (mpp->pg, pgp, i) {
 
pgp->selector = mpp->selector;
fwd += snprint_pathgroup(buff + fwd, len - fwd, 
PRINT_JSON_GROUP, pgp);
-   if (fwd > len)
+   if (fwd >= len)
return fwd;
 
fwd += snprintf(buff + fwd, len - fwd, PRINT_JSON_GROUP_NUM, i 
+ 1);
-   if (fwd > len)
+   if (fwd >= len)
return fwd;
 
fwd += snprint_json(buff + fwd, len - fwd, 3, 
PRINT_JSON_START_PATHS);
-   if 

[dm-devel] sendmail mistake

2016-10-13 Thread tang . wenjun3
I am very sorry , because of my faulty operation ,make a mistake of 
sendmail , please remove the patch had committed  in dm-devel Archives.

I apologize for any inconvenience caused

thanks very much.


[dm-devel] [PATCH 24/94] multipath-tools: document vendor, product, 
revision and bl_product are POSIX Extended regex, tang . wenjun3
[dm-devel] [PATCH 22/94] multipath-tools: add IBM/1813 - DCS3860 to 
hwtable, tang . wenjun3
[dm-devel] [PATCH 23/94] multipath-tools: remove patchwork reference, tang 
. wenjun3
[dm-devel] [PATCH 21/94] multipath-tools: standardize all RDAC devices, 
tang . wenjun3
[dm-devel] [PATCH 20/94] multipath-tools: remove blank line at 
multipath.conf.5, tang . wenjun3
[dm-devel] [PATCH 19/94] multipath-tools: add Oracle FS to hwtable, tang . 
wenjun3
[dm-devel] [PATCH 18/94] multipath-tools: SGI/TP9300 is a RDAC array, tang 
. wenjun3
[dm-devel] [PATCH 17/94] multipath-tools: replace "." for real values in 
(COMPAQ|HP)/"(MSA|HSV)1.0", tang . wenjun3
[dm-devel] [PATCH 16/94] multipath-tools: replace spaces with a regex in 
IBM/"3303 NVDISK", tang . wenjun3
[dm-devel] [PATCH 15/94] multipath-tools: replace (|) with [] when there 
is one element, tang . wenjun3
[dm-devel] [PATCH 14/94] multipath-tools: remove pgpolicy=FAILOVER from 
Ceph/RBD, tang . wenjun3
[dm-devel] [PATCH 13/94] multipath-tools: identify more devices at hwtable
, tang . wenjun3
--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel

Re: [dm-devel] [PATCH] multipathd: fix issue in 'map $map getprstatus' reply

2016-10-13 Thread peng . liang5
Hello Bart,

Thanks for your attention. I don't think it is necessary to do that.
Whatever returning 1 or ENOMEM it will reply "fail\n" and set the 
returning to 1.

The executed code in uxsock_trigger as follows.
if (r > 0) {
if (r == ETIMEDOUT)
*reply = STRDUP("timeout\n");
else
*reply = STRDUP("fail\n");
*len = strlen(*reply) + 1;
r = 1;
} 




发件人: Bart Van Assche 
收件人: , 
, 
抄送:   , , 

日期:   2016/10/12 22:44
主题:   Re: [dm-devel] [PATCH] multipathd: fix issue in 'map $map 
getprstatus' reply



On 10/11/16 20:03, peng.lia...@zte.com.cn wrote:
> From: peng liang 
> 
> -add missing newline to 'map|multipath $map getprstatus' reply
> -use asprintf instead of sprintf
> 
> Signed-off-by: peng liang 
> ---
> multipathd/cli_handlers.c | 14 ++
> 1 file changed, 6 insertions(+), 8 deletions(-)
> 
> diff --git a/multipathd/cli_handlers.c b/multipathd/cli_handlers.c
> index 8ff4362..16445ea 100644
> --- a/multipathd/cli_handlers.c
> +++ b/multipathd/cli_handlers.c
> @@ -1,6 +1,9 @@
> /*
>  * Copyright (c) 2005 Christophe Varoqui
>  */
> +#define _GNU_SOURCE
> +
> +#include 
> #include "checkers.h"
> #include "memory.h"
> #include "vector.h"
> @@ -1285,14 +1288,9 @@ cli_getprstatus (void * v, char ** reply, int *
> len, void * data)
> 
>  condlog(3, "%s: prflag = %u", param, (unsigned 
int)mpp->prflag);
> 
> - *reply =(char *)malloc(2);
> - *len = 2;
> - memset(*reply,0,2);
> -
> -
> - sprintf(*reply,"%d",mpp->prflag);
> - (*reply)[1]='\0';
> -
> + *len = asprintf(reply, "%d\n", mpp->prflag);
> + if (*len < 0)
> +  return 1;
> 
>  condlog(3, "%s: reply = %s", param, *reply);

Hello Peng,

Sorry but returning 1 looks somewhat inconsistent to me. This function
is called indirectly by uxsock_trigger() and that function expects that
cli_getprstatus() either returns a positive error code (E...) or a
negative error code. Please change this patch such that ENOMEM is
returned instead of 1 if asprintf() fails.

Thanks,

Bart.



--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel

Re: [dm-devel] [PATCH] libmultipath: remove redundant code in store_pathinfo

2016-10-13 Thread peng . liang5
Please have a review for this patch, hope for your comments.

Thanks

发件人: peng.lia...@zte.com.cn
收件人: christophe varoqui , 
抄送:   zhang.ka...@zte.com.cn, dm-devel@redhat.com, peng liang 

日期:   2016-08-17 15:06
主题:   [dm-devel] [PATCH] libmultipath: remove redundant code in 
store_pathinfo
发件人: dm-devel-boun...@redhat.com



From: peng liang 

Signed-off-by: peng liang 
---
 libmultipath/discovery.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/libmultipath/discovery.c b/libmultipath/discovery.c
index bb3116d..0017d18 100644
--- a/libmultipath/discovery.c
+++ b/libmultipath/discovery.c
@@ -95,8 +95,6 @@ store_pathinfo (vector pathvec, struct config *conf,
 goto out;
 
 err = store_path(pathvec, pp);
-if (err)
-goto out;
 
 out:
 if (err)
-- 
2.8.1.windows.1

--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel

--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel