From: Benjamin Marzinski <bmarzins@redhat.com>
To: Martin Wilck <Martin.Wilck@suse.com>
Cc: "dm-devel@redhat.com" <dm-devel@redhat.com>
Subject: Re: [PATCH v2 10/17] libmultipath: add code to get vendor specific vpd data
Date: Mon, 10 Feb 2020 14:49:42 -0600 [thread overview]
Message-ID: <20200210204942.GD30153@octiron.msp.redhat.com> (raw)
In-Reply-To: <ad6542e5dce892c1b631f661c51c2e4d107d699c.camel@suse.com>
On Mon, Feb 10, 2020 at 02:49:38PM +0000, Martin Wilck wrote:
> On Wed, 2020-02-05 at 12:58 -0600, Benjamin Marzinski wrote:
> > This adds the wildcard 'g' for multipath and path formatted printing,
> > which returns extra data from a device's vendor specific vpd
> > page. The
> > specific vendor vpd page to use, and the vendor/product id to decode
> > it
> > can be set in the hwentry with vpd_vendor_pg and vpd_vendor_id. It
> > can
> > be configured in the devices section of multipath.conf with the
> > vpd_vendor parameter. Currently, the only devices that use this are
> > HPE
> > 3PAR arrays, to return the Volume Name.
> >
> > Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
> > ---
> > libmultipath/config.c | 2 ++
> > libmultipath/config.h | 1 +
> > libmultipath/dict.c | 38 ++++++++++++++++++++++++++++++++++++
> > libmultipath/discovery.c | 40
> > +++++++++++++++++++++++++++++++++++++-
> > libmultipath/hwtable.c | 1 +
> > libmultipath/print.c | 25 ++++++++++++++++++++++++
> > libmultipath/propsel.c | 18 +++++++++++++++++
> > libmultipath/propsel.h | 1 +
> > libmultipath/structs.h | 15 ++++++++++++++
> > multipath/multipath.conf.5 | 8 ++++++++
> > 10 files changed, 148 insertions(+), 1 deletion(-)
> >
> > diff --git a/libmultipath/structs.h b/libmultipath/structs.h
> > index 1c32a799..6c03ee5d 100644
> > --- a/libmultipath/structs.h
> > +++ b/libmultipath/structs.h
> > @@ -21,6 +21,7 @@
> > #define HOST_NAME_LEN 16
> > #define SLOT_NAME_SIZE 40
> > #define PRKEY_SIZE 19
> > +#define VPD_DATA_SIZE 128
> >
> > #define SCSI_VENDOR_SIZE 9
> > #define SCSI_PRODUCT_SIZE 17
> > @@ -221,6 +222,18 @@ enum all_tg_pt_states {
> > ALL_TG_PT_ON = YNU_YES,
> > };
> >
> > +enum vpd_vendor_ids {
> > + VPD_VP_UNDEF,
> > + VPD_VP_HP3PAR,
> > + VPD_VP_ARRAY_SIZE, /* This must remain the last entry */
> > +};
> > +
> > +struct vpd_vendor_page {
> > + int pg;
> > + const char *name;
> > +};
> > +extern struct vpd_vendor_page vpd_vendor_pages[VPD_VP_ARRAY_SIZE];
> > +
> > struct sg_id {
> > int host_no;
> > int channel;
> > @@ -255,6 +268,7 @@ struct path {
> > char rev[PATH_REV_SIZE];
> > char serial[SERIAL_SIZE];
> > char tgt_node_name[NODE_NAME_SIZE];
> > + char vpd_data[VPD_DATA_SIZE];
>
>
> Hm, 128 more bytes per path for a rarely-used property... do we need to
> store this in "struct path"? Can't we simply fetch that information
> when someone requests it with the %g format wildcard? It doesn't matter
> much today as "struct path" is really thick already, but I have hopes
> to make it a bit leaner some day.
Well, the thought was that this information (which should help map the
path to a physical array) would most often be wanted when things were
going badly, and you might not be able to access the device.
-Ben
> Regards
> Martin
>
> --
> Dr. Martin Wilck <mwilck@suse.com>, Tel. +49 (0)911 74053 2107
> SUSE Software Solutions Germany GmbH
> HRB 36809, AG Nürnberg GF: Felix
> Imendörffer
>
next prev parent reply other threads:[~2020-02-10 20:49 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-05 18:58 [PATCH v2 00/17] Multipath patch dump Benjamin Marzinski
2020-02-05 18:58 ` [PATCH v2 01/17] multipathd: warn when configuration has been changed Benjamin Marzinski
2020-02-10 14:22 ` Martin Wilck
2020-02-05 18:58 ` [PATCH v2 02/17] multipathd: staticify uxlsnr variables/functions Benjamin Marzinski
2020-02-10 14:24 ` Martin Wilck
2020-02-05 18:58 ` [PATCH v2 03/17] libmultipath: fix leak in foreign code Benjamin Marzinski
2020-02-11 9:36 ` Martin Wilck
2020-02-11 22:47 ` Benjamin Marzinski
2020-02-05 18:58 ` [PATCH v2 04/17] Fix leak in mpathpersist Benjamin Marzinski
2020-02-05 18:58 ` [PATCH v2 05/17] libmultipath: remove unused path->prio_args Benjamin Marzinski
2020-02-05 18:58 ` [PATCH v2 06/17] libmultipath: constify get_unaligned_be* Benjamin Marzinski
2020-02-05 18:58 ` [PATCH v2 07/17] libmultipath: add missing hwe mpe variable merges Benjamin Marzinski
2020-02-05 18:58 ` [PATCH v2 08/17] libmultipath: fix sgio_get_vpd looping Benjamin Marzinski
2020-02-10 14:35 ` Martin Wilck
2020-02-05 18:58 ` [PATCH v2 09/17] libmultipath: add vend_id to get_vpd_sgio Benjamin Marzinski
2020-02-05 18:58 ` [PATCH v2 10/17] libmultipath: add code to get vendor specific vpd data Benjamin Marzinski
2020-02-10 14:49 ` Martin Wilck
2020-02-10 20:49 ` Benjamin Marzinski [this message]
2020-02-11 8:09 ` Martin Wilck
2020-02-11 8:39 ` Martin Wilck
2020-02-05 18:58 ` [PATCH v2 11/17] libmultipath: change how the checker async is set Benjamin Marzinski
2020-02-05 18:58 ` [PATCH v2 12/17] libmultipath: change failed path prio timeout Benjamin Marzinski
2020-02-10 14:51 ` Martin Wilck
2020-02-05 18:58 ` [PATCH v2 13/17] multipathd: add new paths under vecs lock Benjamin Marzinski
2020-02-05 18:58 ` [PATCH v2 14/17] libmultipath: add new checker class functions Benjamin Marzinski
2020-02-05 18:58 ` [PATCH v2 15/17] libmultipath: make directio checker share io contexts Benjamin Marzinski
2020-02-10 17:08 ` Martin Wilck
2020-02-10 23:15 ` Benjamin Marzinski
2020-02-11 8:38 ` Martin Wilck
2020-02-11 22:21 ` Benjamin Marzinski
2020-02-11 8:42 ` Martin Wilck
2020-02-05 18:58 ` [PATCH v2 16/17] tests: add directio unit tests Benjamin Marzinski
2020-02-10 17:23 ` Martin Wilck
2020-02-05 18:58 ` [PATCH v2 17/17] tests: make directio tests able to work on a real device Benjamin Marzinski
2020-02-10 17:27 ` Martin Wilck
2020-02-11 8:45 ` [PATCH v2 00/17] Multipath patch dump Martin Wilck
2020-02-11 10:18 ` Martin Wilck
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200210204942.GD30153@octiron.msp.redhat.com \
--to=bmarzins@redhat.com \
--cc=Martin.Wilck@suse.com \
--cc=dm-devel@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.