Skip to contentSkip to conversation

multipath format options cleanup

PATCH In review Benjamin Marzinski 3 participants 7 messages Jan 12, 2023 – Jan 16, 2023 Device mapper

lore
Share & tools
lore

Benjamin Marzinski

author maintainer
#0 lore raw

cover multipath format options cleanup

These are two small cleanup patches for the multipathd format wildcards that I've been given.

Nitin Yewale (2):
multipathd: Add format options to multipathd man page
libmultipath: remove pathgroup wildcard options

 libmultipath/print.c    |  7 -------
 multipathd/multipathd.8 | 16 ++++++++++++----
 2 files changed, 12 insertions(+), 11 deletions(-)
Signature · 6 lines
2.17.2

--
dm-devel mailing list
[email protected]
https://listman.redhat.com/mailman/listinfo/dm-devel
author maintainer
#1 lore raw

PATCH 1/2 multipathd: Add format options to multipathd man page

From: Nitin Yewale <[email protected]>

Move "multipathd show wildcards" command above the $format commands and also add $format options for "map" and "path" commands to the multipathd man page.

---
 multipathd/multipathd.8 | 16 ++++++++++++----
 1 file changed, 12 insertions(+), 4 deletions(-)
multipathd/multipathd.8 +12 -4
index bdf102eb..95d475da 100644
@@ -113,9 +113,17 @@ The following commands can be used in interactive mode:
 Show the paths that multipathd is monitoring, and their state.
 .
 .TP
+.B list|show wildcards
+Show the format wildcards used in interactive commands taking $format.
+.
+.TP
 .B list|show paths format $format
 Show the paths that multipathd is monitoring, using a format string with path
 format wildcards.
+
+path format wildcards:
+
+%w (uuid), %i (hcil), %d (dev), %D (dev_t), %t (dm_st), %o (dev_st), %T (chk_st), %s (vend/prod/rev), %c (checker), %C (next_check), %p (pri), %S (size), %z (serial), %M (marginal_st), %m (multipath), %N (host WWNN), %n (target WWNN), %R (host WWPN), %r (target WWPN), %a (host adapter), %G (foreign), %g (vpd page data), %0 (failures), %P (protocol)
 .
 .TP
 .B list|show maps|multipaths
@@ -125,6 +133,10 @@ Show the multipath devices that the multipathd is monitoring.
 .B list|show maps|multipaths format $format
 Show the status of all multipath devices that the multipathd is monitoring,
 using a format string with multipath format wildcards.
+
+multipath format wildcards:
+
+%n (name), %w (uuid), %d (sysfs), %F (failback), %Q (queueing), %N (no. of paths), %r (write_prot), %t (dm-st), %S (size), %f (features), %x (failures), %h (hwhandler), %A (action), %0 (path_faults), %1 (switch_grp), %2 (map_loads), %3 (total_q_time), %4 (q_timeouts), %s (vend/prod/rev), %v (vend), %p (prod), %e (rev), %G (foreign), %g (vpd page data)
 .
 .TP
 .B list|show maps|multipaths status
@@ -148,10 +160,6 @@ Show topology of a single multipath device specified by $map, for example
 36005076303ffc56200000000000010aa. This map could be obtained from '\fIlist maps\fR'.
 .
 .TP
-.B list|show wildcards
-Show the format wildcards used in interactive commands taking $format.
-.
-.TP
 .B list|show config
 Show the currently used configuration, derived from default values and values
 specified within the configuration file \fI/etc/multipath.conf\fR.
Signature · 6 lines
2.17.2

--
dm-devel mailing list
[email protected]
https://listman.redhat.com/mailman/listinfo/dm-devel
#2 lore raw

Re: [dm-devel] [PATCH 1/2] multipathd: Add format options to multipathd man page

Quoted 35 lines · Benjamin Marzinski

From: Nitin Yewale <[email protected]>

Move "multipathd show wildcards" command above the $format commands and
also add $format options for "map" and "path" commands to the multipathd
man page.

---
 multipathd/multipathd.8 | 16 ++++++++++++----

 1 file changed, 12 insertions(+), 4 deletions(-)
multipathd/multipathd.8 +0 -0
index bdf102eb..95d475da 100644
@@ -113,9 +113,17 @@ The following commands can be used in

interactive mode:
 Show the paths that multipathd is monitoring, and their state. .
 .TP
+.B list|show wildcards
+Show the format wildcards used in interactive commands taking $format.
+.
+.TP
 .B list|show paths format $format
 Show the paths that multipathd is monitoring, using a format string with path
 format wildcards.

multipathd/multipathd.8 +4 -0
+
+path format wildcards:
+
+%w (uuid), %i (hcil), %d (dev), %D (dev_t), %t (dm_st), %o (dev_st),
Quoted 6 lines

%T (chk_st), %s (vend/prod/rev), %c (checker), %C (next_check), %p (pri), %S (size), %z (serial), %M (marginal_st), %m (multipath), %N (host WWNN), %n (target WWNN), %R (host WWPN), %r (target WWPN), %a (host adapter), %G (foreign), %g (vpd page data), %0 (failures), %P (protocol)
 .

If we do this in the first place, we should explain it better. Terms like "dm_st" need explanation. The explanation would grow into a longer paragraph, which should be moved to the bottom of the man page with a cross reference here.

Quoted 12 lines

 .TP
 .B list|show maps|multipaths

multipathd/multipathd.8 +0 -0
@@ -125,6 +133,10 @@ Show the multipath devices that the multipathd

is monitoring.
 .B list|show maps|multipaths format $format
 Show the status of all multipath devices that the multipathd is monitoring,
 using a format string with multipath format wildcards.

multipathd/multipathd.8 +4 -0
+
+multipath format wildcards:
+
+%n (name), %w (uuid), %d (sysfs), %F (failback), %Q (queueing), %N
Quoted 5 lines

(no. of paths), %r (write_prot), %t (dm-st), %S (size), %f (features), %x (failures), %h (hwhandler), %A (action), %0 (path_faults), %1 (switch_grp), %2 (map_loads), %3 (total_q_time), %4 (q_timeouts), %s (vend/prod/rev), %v (vend), %p (prod), %e (rev), %G (foreign), %g (vpd page data)

Same comment as above.

Martin

Quoted 10 lines

 .
 .TP
 .B list|show maps|multipaths status

multipathd/multipathd.8 +0 -0
@@ -148,10 +160,6 @@ Show topology of a single multipath device

specified by $map, for example 36005076303ffc56200000000000010aa. This map could be obtained from '\fIlist maps\fR'.
 .
 .TP
-.B list|show wildcards

Quoted 8 lines

-Show the format wildcards used in interactive commands taking $format.
-.
-.TP
 .B list|show config
 Show the currently used configuration, derived from default values and values
 specified within the configuration file \fI/etc/multipath.conf\fR.

--
dm-devel mailing list
[email protected]
https://listman.redhat.com/mailman/listinfo/dm-devel

#3 lore raw

Re: [dm-devel] [PATCH 1/2] multipathd: Add format options to multipathd man page

Hello Ben,

I can try to explain the $format options. Will update bz with the new patch.

Thank you,
Nitin Yewale

Quoted 90 lines · Martin Wilck
Quoted 35 lines · Benjamin Marzinski

From: Nitin Yewale <[email protected]>

Move "multipathd show wildcards" command above the $format commands and
also add $format options for "map" and "path" commands to the multipathd
man page.

---
 multipathd/multipathd.8 | 16 ++++++++++++----
 1 file changed, 12 insertions(+), 4 deletions(-)
multipathd/multipathd.8 +0 -0
index bdf102eb..95d475da 100644
@@ -113,9 +113,17 @@ The following commands can be used in

interactive mode:
Show the paths that multipathd is monitoring, and their state. .
.TP
+.B list|show wildcards
+Show the format wildcards used in interactive commands taking $format.
+.
+.TP
.B list|show paths format $format
Show the paths that multipathd is monitoring, using a format string
with path
format wildcards.

multipathd/multipathd.8 +4 -0
+
+path format wildcards:
+
+%w (uuid), %i (hcil), %d (dev), %D (dev_t), %t (dm_st), %o (dev_st),
Quoted 6 lines

%T (chk_st), %s (vend/prod/rev), %c (checker), %C (next_check), %p (pri), %S (size), %z (serial), %M (marginal_st), %m (multipath), %N (host WWNN), %n (target WWNN), %R (host WWPN), %r (target WWPN), %a (host adapter), %G (foreign), %g (vpd page data), %0 (failures), %P (protocol)
.

If we do this in the first place, we should explain it better. Terms like "dm_st" need explanation. The explanation would grow into a longer paragraph, which should be moved to the bottom of the man page with a cross reference here.

Quoted 12 lines

.TP
.B list|show maps|multipaths

multipathd/multipathd.8 +0 -0
@@ -125,6 +133,10 @@ Show the multipath devices that the multipathd

is monitoring.
.B list|show maps|multipaths format $format
Show the status of all multipath devices that the multipathd is
monitoring,
using a format string with multipath format wildcards.

multipathd/multipathd.8 +4 -0
+
+multipath format wildcards:
+
+%n (name), %w (uuid), %d (sysfs), %F (failback), %Q (queueing), %N
Quoted 5 lines

(no. of paths), %r (write_prot), %t (dm-st), %S (size), %f (features), %x (failures), %h (hwhandler), %A (action), %0 (path_faults), %1 (switch_grp), %2 (map_loads), %3 (total_q_time), %4 (q_timeouts), %s (vend/prod/rev), %v (vend), %p (prod), %e (rev), %G (foreign), %g (vpd page data)

Same comment as above.

Martin

Quoted 18 lines

.
.TP
.B list|show maps|multipaths status

multipathd/multipathd.8 +0 -0
@@ -148,10 +160,6 @@ Show topology of a single multipath device

specified by $map, for example
36005076303ffc56200000000000010aa. This map could be obtained from
'\fIlist maps\fR'.
.
.TP
-.B list|show wildcards
-Show the format wildcards used in interactive commands taking $format.
-.
-.TP
.B list|show config
Show the currently used configuration, derived from default values
and values
specified within the configuration file \fI/etc/multipath.conf\fR.

Signature · 1 line
Regards,

--
dm-devel mailing list
[email protected]
https://listman.redhat.com/mailman/listinfo/dm-devel

author maintainer
#4 lore raw

Re: [dm-devel] [PATCH 1/2] multipathd: Add format options to multipathd man page

Quoted 3 lines · Nitin Yewale

Hello Ben,

I can try to explain the $format options. Will update bz with the new patch.

Sure. You're welcome to post patches directly to dm-devel as well. But if it's more convinient for you to post them to the bugzilla, I can forward them for you.

-Ben

Quoted 88 lines

Thank you,
Nitin Yewale

Quoted 82 lines · Martin Wilck
Quoted 35 lines · Benjamin Marzinski

From: Nitin Yewale <[email protected]>

Move "multipathd show wildcards" command above the $format commands and
also add $format options for "map" and "path" commands to the multipathd
man page.

---
 multipathd/multipathd.8 | 16 ++++++++++++----
 1 file changed, 12 insertions(+), 4 deletions(-)
multipathd/multipathd.8 +0 -0
index bdf102eb..95d475da 100644
@@ -113,9 +113,17 @@ The following commands can be used in

interactive mode:
Show the paths that multipathd is monitoring, and their state. .
.TP
+.B list|show wildcards
+Show the format wildcards used in interactive commands taking $format.
+.
+.TP
.B list|show paths format $format
Show the paths that multipathd is monitoring, using a format string
with path
format wildcards.

multipathd/multipathd.8 +4 -0
+
+path format wildcards:
+
+%w (uuid), %i (hcil), %d (dev), %D (dev_t), %t (dm_st), %o (dev_st),
Quoted 6 lines

%T (chk_st), %s (vend/prod/rev), %c (checker), %C (next_check), %p (pri), %S (size), %z (serial), %M (marginal_st), %m (multipath), %N (host WWNN), %n (target WWNN), %R (host WWPN), %r (target WWPN), %a (host adapter), %G (foreign), %g (vpd page data), %0 (failures), %P (protocol)
.

If we do this in the first place, we should explain it better. Terms like "dm_st" need explanation. The explanation would grow into a longer paragraph, which should be moved to the bottom of the man page with a cross reference here.

Quoted 12 lines

.TP
.B list|show maps|multipaths

multipathd/multipathd.8 +0 -0
@@ -125,6 +133,10 @@ Show the multipath devices that the multipathd

is monitoring.
.B list|show maps|multipaths format $format
Show the status of all multipath devices that the multipathd is
monitoring,
using a format string with multipath format wildcards.

multipathd/multipathd.8 +4 -0
+
+multipath format wildcards:
+
+%n (name), %w (uuid), %d (sysfs), %F (failback), %Q (queueing), %N
Quoted 5 lines

(no. of paths), %r (write_prot), %t (dm-st), %S (size), %f (features), %x (failures), %h (hwhandler), %A (action), %0 (path_faults), %1 (switch_grp), %2 (map_loads), %3 (total_q_time), %4 (q_timeouts), %s (vend/prod/rev), %v (vend), %p (prod), %e (rev), %G (foreign), %g (vpd page data)

Same comment as above.

Martin

Quoted 12 lines

.
.TP
.B list|show maps|multipaths status

multipathd/multipathd.8 +0 -0
@@ -148,10 +160,6 @@ Show topology of a single multipath device

specified by $map, for example
36005076303ffc56200000000000010aa. This map could be obtained from
'\fIlist maps\fR'.
.
.TP
-.B list|show wildcards
-Show the format wildcards used in interactive commands taking $format.

Quoted 11 lines
Quoted 8 lines
Quoted 6 lines

-.
-.TP
.B list|show config
Show the currently used configuration, derived from default values
and values
specified within the configuration file \fI/etc/multipath.conf\fR.

Signature · 1 line
Regards,

--
dm-devel mailing list
[email protected]
https://listman.redhat.com/mailman/listinfo/dm-devel

author maintainer
#5 lore raw

PATCH 2/2 libmultipath: remove pathgroup wildcard options

In reply to Benjamin Marzinski

From: Nitin Yewale <[email protected]>

The multipathd command "multipathd show wildcards" shows the pathgroup format wildcards, but there is no way to use them in a multipathd command.

---
 libmultipath/print.c | 7 -------
 1 file changed, 7 deletions(-)
libmultipath/print.c +0 -7
index 3193dbe0..9df77247 100644
@@ -865,13 +865,6 @@ int snprint_wildcards(struct strbuf *buff)
 				       pd[i].wildcard, pd[i].header)) < 0)
 			return rc;
 
-	if ((rc = append_strbuf_str(buff, "\npathgroup format wildcards:\n")) < 0)
-		return rc;
-	for (i = 0; i < ARRAY_SIZE(pgd); i++)
-		if ((rc = print_strbuf(buff, "%%%c  %s\n",
-				       pgd[i].wildcard, pgd[i].header)) < 0)
-			return rc;
-
 	return get_strbuf_len(buff) - initial_len;
 }
 
Signature · 6 lines
2.17.2

--
dm-devel mailing list
[email protected]
https://listman.redhat.com/mailman/listinfo/dm-devel
Reviewed-by on v1 2/2
#6 lore raw

Re: [dm-devel] [PATCH 2/2] libmultipath: remove pathgroup wildcard options

Quoted 8 lines · Benjamin Marzinski

From: Nitin Yewale <[email protected]>

The multipathd command "multipathd show wildcards" shows the pathgroup
format wildcards, but there is no way to use them in a multipathd command.

Quoted 17 lines

---
 libmultipath/print.c | 7 -------

 1 file changed, 7 deletions(-)
libmultipath/print.c +0 -0
index 3193dbe0..9df77247 100644
@@ -865,13 +865,6 @@ int snprint_wildcards(struct strbuf *buff)
                                        pd[i].wildcard, pd[i].header))
 < 0)
                         return rc;


-       if ((rc = append_strbuf_str(buff, "\npathgroup format wildcards:\n")) < 0)
-               return rc;
-       for (i = 0; i < ARRAY_SIZE(pgd); i++)

Quoted 8 lines

-               if ((rc = print_strbuf(buff, "%%%c  %s\n", -                                      pgd[i].wildcard, pgd[i].header)) < 0)
-                       return rc;
-
        return get_strbuf_len(buff) - initial_len; }

--
dm-devel mailing list
[email protected]
https://listman.redhat.com/mailman/listinfo/dm-devel