Skip to contentSkip to conversation

Return PATH_UP for non-SCSI devices in path_offline()

PATCH New Hannes Reinecke 1 participant 1 message May 5, 2011 Device mapper

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Return PATH_UP for non-SCSI devices in path_offline()

path_offline() only makes sense for SCSI devices, as non of the other types can detect the path state.

libmultipath/discovery.c +4 -0
index aa25cc4..a93f08c 100644
@@ -706,6 +706,10 @@ path_offline (struct path * pp)
 	struct sysfs_device * parent;
 	char buff[SCSI_STATE_SIZE];
 
+	if (pp->bus != SYSFS_BUS_SCSI)
+		/* No information for non-SCSI devices, return UP */
+		return PATH_UP;
+
 	pp->sysdev = sysfs_device_from_path(pp);
 	if (!pp->sysdev) {
 		condlog(1, "%s: failed to get sysfs information", pp->dev);