All of lore.kernel.org
 help / color / mirror / Atom feed
* [dm-devel] [PATCH 0/2] multipath format options cleanup
@ 2023-01-12 20:28 Benjamin Marzinski
  2023-01-12 20:28 ` [dm-devel] [PATCH 1/2] multipathd: Add format options to multipathd man page Benjamin Marzinski
  2023-01-12 20:28 ` [dm-devel] [PATCH 2/2] libmultipath: remove pathgroup wildcard options Benjamin Marzinski
  0 siblings, 2 replies; 7+ messages in thread
From: Benjamin Marzinski @ 2023-01-12 20:28 UTC (permalink / raw)
  To: Christophe Varoqui; +Cc: device-mapper development, Nitin Yewale, Martin Wilck

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(-)

-- 
2.17.2

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


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [dm-devel] [PATCH 1/2] multipathd: Add format options to multipathd man page
  2023-01-12 20:28 [dm-devel] [PATCH 0/2] multipath format options cleanup Benjamin Marzinski
@ 2023-01-12 20:28 ` Benjamin Marzinski
  2023-01-13  8:52   ` Martin Wilck
  2023-01-12 20:28 ` [dm-devel] [PATCH 2/2] libmultipath: remove pathgroup wildcard options Benjamin Marzinski
  1 sibling, 1 reply; 7+ messages in thread
From: Benjamin Marzinski @ 2023-01-12 20:28 UTC (permalink / raw)
  To: Christophe Varoqui; +Cc: device-mapper development, Nitin Yewale, Martin Wilck

From: Nitin Yewale <nyewale@redhat.com>

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

Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
---
 multipathd/multipathd.8 | 16 ++++++++++++----
 1 file changed, 12 insertions(+), 4 deletions(-)

diff --git a/multipathd/multipathd.8 b/multipathd/multipathd.8
index bdf102eb..95d475da 100644
--- a/multipathd/multipathd.8
+++ b/multipathd/multipathd.8
@@ -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.
-- 
2.17.2

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


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [dm-devel] [PATCH 2/2] libmultipath: remove pathgroup wildcard options
  2023-01-12 20:28 [dm-devel] [PATCH 0/2] multipath format options cleanup Benjamin Marzinski
  2023-01-12 20:28 ` [dm-devel] [PATCH 1/2] multipathd: Add format options to multipathd man page Benjamin Marzinski
@ 2023-01-12 20:28 ` Benjamin Marzinski
  2023-01-13  8:52   ` Martin Wilck
  1 sibling, 1 reply; 7+ messages in thread
From: Benjamin Marzinski @ 2023-01-12 20:28 UTC (permalink / raw)
  To: Christophe Varoqui; +Cc: device-mapper development, Nitin Yewale, Martin Wilck

From: Nitin Yewale <nyewale@redhat.com>

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

Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
---
 libmultipath/print.c | 7 -------
 1 file changed, 7 deletions(-)

diff --git a/libmultipath/print.c b/libmultipath/print.c
index 3193dbe0..9df77247 100644
--- a/libmultipath/print.c
+++ b/libmultipath/print.c
@@ -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;
 }
 
-- 
2.17.2

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


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [dm-devel] [PATCH 1/2] multipathd: Add format options to multipathd man page
  2023-01-12 20:28 ` [dm-devel] [PATCH 1/2] multipathd: Add format options to multipathd man page Benjamin Marzinski
@ 2023-01-13  8:52   ` Martin Wilck
  2023-01-13 12:46     ` Nitin Yewale
  0 siblings, 1 reply; 7+ messages in thread
From: Martin Wilck @ 2023-01-13  8:52 UTC (permalink / raw)
  To: bmarzins, christophe.varoqui; +Cc: dm-devel, nyewale

On Thu, 2023-01-12 at 14:28 -0600, Benjamin Marzinski wrote:
> From: Nitin Yewale <nyewale@redhat.com>
> 
> Move "multipathd show wildcards" command above the $format commands
> and
> also add $format options for "map" and "path" commands to the
> multipathd
> man page.
> 
> Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
> ---
>  multipathd/multipathd.8 | 16 ++++++++++++----
>  1 file changed, 12 insertions(+), 4 deletions(-)
> 
> diff --git a/multipathd/multipathd.8 b/multipathd/multipathd.8
> index bdf102eb..95d475da 100644
> --- a/multipathd/multipathd.8
> +++ b/multipathd/multipathd.8
> @@ -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)
>  .

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.

>  .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)

Same comment as above.

Martin

>  .
>  .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.

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


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [dm-devel] [PATCH 2/2] libmultipath: remove pathgroup wildcard options
  2023-01-12 20:28 ` [dm-devel] [PATCH 2/2] libmultipath: remove pathgroup wildcard options Benjamin Marzinski
@ 2023-01-13  8:52   ` Martin Wilck
  0 siblings, 0 replies; 7+ messages in thread
From: Martin Wilck @ 2023-01-13  8:52 UTC (permalink / raw)
  To: bmarzins, christophe.varoqui; +Cc: dm-devel, nyewale

On Thu, 2023-01-12 at 14:28 -0600, Benjamin Marzinski wrote:
> From: Nitin Yewale <nyewale@redhat.com>
> 
> The multipathd command "multipathd show wildcards" shows the
> pathgroup
> format wildcards, but there is no way to use them in a multipathd
> command.
> 
> Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
Reviewed-by: Martin Wilck <mwilck@suse.com>

> ---
>  libmultipath/print.c | 7 -------
>  1 file changed, 7 deletions(-)
> 
> diff --git a/libmultipath/print.c b/libmultipath/print.c
> index 3193dbe0..9df77247 100644
> --- a/libmultipath/print.c
> +++ b/libmultipath/print.c
> @@ -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;
>  }
>  

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


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [dm-devel] [PATCH 1/2] multipathd: Add format options to multipathd man page
  2023-01-13  8:52   ` Martin Wilck
@ 2023-01-13 12:46     ` Nitin Yewale
  2023-01-16 17:39       ` Benjamin Marzinski
  0 siblings, 1 reply; 7+ messages in thread
From: Nitin Yewale @ 2023-01-13 12:46 UTC (permalink / raw)
  To: Ben Marzinski; +Cc: dm-devel


[-- Attachment #1.1: Type: text/plain, Size: 3329 bytes --]

Hello Ben,

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

Thank you,
Nitin Yewale

On Fri, Jan 13, 2023 at 2:22 PM Martin Wilck <martin.wilck@suse.com> wrote:

> On Thu, 2023-01-12 at 14:28 -0600, Benjamin Marzinski wrote:
> > From: Nitin Yewale <nyewale@redhat.com>
> >
> > Move "multipathd show wildcards" command above the $format commands
> > and
> > also add $format options for "map" and "path" commands to the
> > multipathd
> > man page.
> >
> > Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
> > ---
> >  multipathd/multipathd.8 | 16 ++++++++++++----
> >  1 file changed, 12 insertions(+), 4 deletions(-)
> >
> > diff --git a/multipathd/multipathd.8 b/multipathd/multipathd.8
> > index bdf102eb..95d475da 100644
> > --- a/multipathd/multipathd.8
> > +++ b/multipathd/multipathd.8
> > @@ -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)
> >  .
>
> 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.
>
> >  .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)
>
> Same comment as above.
>
> Martin
>
> >  .
> >  .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.
>
>

-- 
Regards,

[-- Attachment #1.2: Type: text/html, Size: 4475 bytes --]

[-- Attachment #2: Type: text/plain, Size: 98 bytes --]

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [dm-devel] [PATCH 1/2] multipathd: Add format options to multipathd man page
  2023-01-13 12:46     ` Nitin Yewale
@ 2023-01-16 17:39       ` Benjamin Marzinski
  0 siblings, 0 replies; 7+ messages in thread
From: Benjamin Marzinski @ 2023-01-16 17:39 UTC (permalink / raw)
  To: Nitin Yewale; +Cc: dm-devel

On Fri, Jan 13, 2023 at 06:16:37PM +0530, Nitin Yewale wrote:
> 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

> 
> Thank you,
> Nitin Yewale
> 
> On Fri, Jan 13, 2023 at 2:22 PM Martin Wilck <martin.wilck@suse.com> wrote:
> 
> > On Thu, 2023-01-12 at 14:28 -0600, Benjamin Marzinski wrote:
> > > From: Nitin Yewale <nyewale@redhat.com>
> > >
> > > Move "multipathd show wildcards" command above the $format commands
> > > and
> > > also add $format options for "map" and "path" commands to the
> > > multipathd
> > > man page.
> > >
> > > Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
> > > ---
> > >  multipathd/multipathd.8 | 16 ++++++++++++----
> > >  1 file changed, 12 insertions(+), 4 deletions(-)
> > >
> > > diff --git a/multipathd/multipathd.8 b/multipathd/multipathd.8
> > > index bdf102eb..95d475da 100644
> > > --- a/multipathd/multipathd.8
> > > +++ b/multipathd/multipathd.8
> > > @@ -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)
> > >  .
> >
> > 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.
> >
> > >  .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)
> >
> > Same comment as above.
> >
> > Martin
> >
> > >  .
> > >  .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.
> >
> >
> 
> -- 
> Regards,
--
dm-devel mailing list
dm-devel@redhat.com
https://listman.redhat.com/mailman/listinfo/dm-devel


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2023-01-16 17:40 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-12 20:28 [dm-devel] [PATCH 0/2] multipath format options cleanup Benjamin Marzinski
2023-01-12 20:28 ` [dm-devel] [PATCH 1/2] multipathd: Add format options to multipathd man page Benjamin Marzinski
2023-01-13  8:52   ` Martin Wilck
2023-01-13 12:46     ` Nitin Yewale
2023-01-16 17:39       ` Benjamin Marzinski
2023-01-12 20:28 ` [dm-devel] [PATCH 2/2] libmultipath: remove pathgroup wildcard options Benjamin Marzinski
2023-01-13  8:52   ` Martin Wilck

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.