[dm-devel] [PATCH v2 11/12] libmultipath: add get_uid fallback code for NVMe devices

Martin Wilck mwilck at suse.com
Wed Mar 20 07:55:26 UTC 2019


On Tue, 2019-03-19 at 12:15 -0500, Benjamin Marzinski wrote:
> On Fri, Mar 15, 2019 at 12:49:41PM +0100, Martin Wilck wrote:
> > On Fri, 2019-03-08 at 17:12 -0600, Benjamin Marzinski wrote:
> > > If multipath can't get the uid for NVMe devices from udev, it can
> > > get
> > > it
> > > directly from sysfs.
> > > 
> > > Signed-off-by: Benjamin Marzinski <bmarzins at redhat.com>
> > > ---
> > >  libmultipath/discovery.c | 49 ++++++++++++++++++++++++++++----
> > > ----
> > > ----
> > >  1 file changed, 34 insertions(+), 15 deletions(-)
> > 
> > Aside the nit over the "old_len" variable name that I remarked on
> > 07/12:
> 
> Sure, assuming that we come to some agreement that keeps the fallback
> code.

One more thing as you're working on this stuff anyway: I find it wrong
that the fallback function itself checks (using retriggers or whatever
other criterion) whether or not it should do something. uid_fallback()
should simply retrieve and return the UID, and the caller should decide
what to do with that, or whether to call uid_fallback() at all. I guess
that would make it necessary to change the API such that uid_fallback
doesn't write to pp->wwid directly, but takes (or allocates) a separate
buffer.

This isn't a problem of your patch, but I think it should be fixed
while we're on it.

Regards
Martin

-- 
Dr. Martin Wilck <mwilck at suse.com>, Tel. +49 (0)911 74053 2107
SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton
HRB 21284 (AG Nürnberg)





More information about the dm-devel mailing list