Blame SOURCES/0240-UPBZ-1568902-id_size.patch

4728c8
---
4728c8
 libmultipath/discovery.c |   12 ++++++------
4728c8
 libmultipath/structs.h   |   11 +++++++++--
4728c8
 2 files changed, 15 insertions(+), 8 deletions(-)
4728c8
4728c8
Index: multipath-tools-130222/libmultipath/discovery.c
4728c8
===================================================================
4728c8
--- multipath-tools-130222.orig/libmultipath/discovery.c
4728c8
+++ multipath-tools-130222/libmultipath/discovery.c
4728c8
@@ -845,12 +845,12 @@ scsi_sysfs_pathinfo (struct path * pp)
4728c8
 
4728c8
 	condlog(3, "%s: vendor = %s", pp->dev, pp->vendor_id);
4728c8
 
4728c8
-	if (sysfs_get_model(parent, pp->product_id, SCSI_PRODUCT_SIZE))
4728c8
+	if (sysfs_get_model(parent, pp->product_id, PATH_PRODUCT_SIZE))
4728c8
 		return 1;
4728c8
 
4728c8
 	condlog(3, "%s: product = %s", pp->dev, pp->product_id);
4728c8
 
4728c8
-	if (sysfs_get_rev(parent, pp->rev, SCSI_REV_SIZE))
4728c8
+	if (sysfs_get_rev(parent, pp->rev, PATH_REV_SIZE))
4728c8
 		return 1;
4728c8
 
4728c8
 	condlog(3, "%s: rev = %s", pp->dev, pp->rev);
4728c8
@@ -904,11 +904,11 @@ nvme_sysfs_pathinfo (struct path * pp)
4728c8
 		return 1;
4728c8
 
4728c8
 	snprintf(pp->vendor_id, SCSI_VENDOR_SIZE, "NVME");
4728c8
-	snprintf(pp->product_id, SCSI_PRODUCT_SIZE, "%s",
4728c8
+	snprintf(pp->product_id, PATH_PRODUCT_SIZE, "%s",
4728c8
 		 udev_device_get_sysattr_value(parent, "model"));
4728c8
 	snprintf(pp->serial, SERIAL_SIZE, "%s",
4728c8
 		 udev_device_get_sysattr_value(parent, "serial"));
4728c8
-	snprintf(pp->rev, SCSI_REV_SIZE, "%s",
4728c8
+	snprintf(pp->rev, PATH_REV_SIZE, "%s",
4728c8
 		 udev_device_get_sysattr_value(parent, "firmware_rev"));
4728c8
 
4728c8
 	condlog(3, "%s: vendor = %s", pp->dev, pp->vendor_id);
4728c8
@@ -1022,12 +1022,12 @@ cciss_sysfs_pathinfo (struct path * pp)
4728c8
 
4728c8
 	condlog(3, "%s: vendor = %s", pp->dev, pp->vendor_id);
4728c8
 
4728c8
-	if (sysfs_get_model(parent, pp->product_id, SCSI_PRODUCT_SIZE))
4728c8
+	if (sysfs_get_model(parent, pp->product_id, PATH_PRODUCT_SIZE))
4728c8
 		return 1;
4728c8
 
4728c8
 	condlog(3, "%s: product = %s", pp->dev, pp->product_id);
4728c8
 
4728c8
-	if (sysfs_get_rev(parent, pp->rev, SCSI_REV_SIZE))
4728c8
+	if (sysfs_get_rev(parent, pp->rev, PATH_REV_SIZE))
4728c8
 		return 1;
4728c8
 
4728c8
 	condlog(3, "%s: rev = %s", pp->dev, pp->rev);
4728c8
Index: multipath-tools-130222/libmultipath/structs.h
4728c8
===================================================================
4728c8
--- multipath-tools-130222.orig/libmultipath/structs.h
4728c8
+++ multipath-tools-130222/libmultipath/structs.h
4728c8
@@ -24,6 +24,13 @@
4728c8
 #define SCSI_PRODUCT_SIZE	17
4728c8
 #define SCSI_REV_SIZE		5
4728c8
 #define SCSI_STATE_SIZE		19
4728c8
+#define NVME_MODEL_SIZE		41
4728c8
+#define NVME_REV_SIZE		9
4728c8
+
4728c8
+/* This must be the maximum of SCSI and NVME sizes */
4728c8
+#define PATH_PRODUCT_SIZE NVME_MODEL_SIZE
4728c8
+#define PATH_REV_SIZE NVME_REV_SIZE
4728c8
+
4728c8
 
4728c8
 #define NO_PATH_RETRY_UNDEF	0
4728c8
 #define NO_PATH_RETRY_FAIL	-1
4728c8
@@ -212,8 +219,8 @@ struct path {
4728c8
 	struct hd_geometry geom;
4728c8
 	char wwid[WWID_SIZE];
4728c8
 	char vendor_id[SCSI_VENDOR_SIZE];
4728c8
-	char product_id[SCSI_PRODUCT_SIZE];
4728c8
-	char rev[SCSI_REV_SIZE];
4728c8
+	char product_id[PATH_PRODUCT_SIZE];
4728c8
+	char rev[PATH_REV_SIZE];
4728c8
 	char serial[SERIAL_SIZE];
4728c8
 	char tgt_node_name[NODE_NAME_SIZE];
4728c8
 	unsigned long long size;