All of lore.kernel.org
 help / color / mirror / Atom feed
* libmultipath issue
@ 2017-06-13 16:19 James Shoemaker
  2017-06-13 20:28 ` Martin Wilck
  0 siblings, 1 reply; 2+ messages in thread
From: James Shoemaker @ 2017-06-13 16:19 UTC (permalink / raw)
  To: dm-devel


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

   I have a piece of hardware, a 16 bay storagetek  optically connected SAN
to
be specific, that returns empty string for Device id.

   I did the following patch to resolve the issue, it basically allows empty
string for vendor and product, I couldn't find anywhere that had an issue
with
it..

diff --git a/libmultipath/discovery.c b/libmultipath/discovery.c
index 663c8ea..92d0e49 100644
--- a/libmultipath/discovery.c
+++ b/libmultipath/discovery.c
@@ -1149,12 +1149,12 @@ scsi_sysfs_pathinfo (struct path * pp, vector
hwtable)
        if (!attr_path || pp->sg_id.host_no == -1)
                return 1;

-       if (sysfs_get_vendor(parent, pp->vendor_id, SCSI_VENDOR_SIZE) <= 0)
+       if (sysfs_get_vendor(parent, pp->vendor_id, SCSI_VENDOR_SIZE) < 0)
                return 1;

        condlog(3, "%s: vendor = %s", pp->dev, pp->vendor_id);

-       if (sysfs_get_model(parent, pp->product_id, SCSI_PRODUCT_SIZE) <= 0)
+       if (sysfs_get_model(parent, pp->product_id, SCSI_PRODUCT_SIZE) < 0)
                return 1;

        condlog(3, "%s: product = %s", pp->dev, pp->product_id);

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

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



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

end of thread, other threads:[~2017-06-13 20:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-06-13 16:19 libmultipath issue James Shoemaker
2017-06-13 20:28 ` 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.