Skip to contentSkip to conversation

multipath: get right sysfs value for checker_timeout

PATCH In review Benjamin Marzinski 2 participants 2 messages Oct 5, 2011 Device mapper

lore
Share & tools
lore

Benjamin Marzinski

author maintainer
#0 lore raw

PATCH 1/1 multipath: get right sysfs value for checker_timeout

sysfs_get_timeout() wasn't looking in the correct directory for the checker timeout value. It was looking at .../block/<devname>/timeout, instead of .../block/<devname>/device/timeout

---
 libmultipath/discovery.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
libmultipath/discovery.c +1 -1
Index: multipath-tools-110916/libmultipath/discovery.c
===================================================================
@@ -166,7 +166,7 @@ sysfs_get_timeout(struct sysfs_device *d
 	if (safe_sprintf(attr_path, "%s/device", dev->devpath))
 		return 1;
 
-	len = sysfs_attr_get_value(dev->devpath, "timeout", attr, NAME_SIZE);
+	len = sysfs_attr_get_value(attr_path, "timeout", attr, NAME_SIZE);
 	if (!len) {
 		condlog(3, "%s: No timeout value in sysfs", dev->devpath);
 		return 1;
#1 lore raw
Quoted 4 lines · Benjamin Marzinski

sysfs_get_timeout() wasn't looking in the correct directory for the checker timeout value. It was looking at .../block/<devname>/timeout, instead of .../block/<devname>/device/timeout

Merged.

Quoted 18 lines
---
 libmultipath/discovery.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: multipath-tools-110916/libmultipath/discovery.c
===================================================================

libmultipath/discovery.c +1 -1
@@ -166,7 +166,7 @@ sysfs_get_timeout(struct sysfs_device *d
 	if (safe_sprintf(attr_path, "%s/device", dev->devpath))
 		return 1;
 
-	len = sysfs_attr_get_value(dev->devpath, "timeout", attr, NAME_SIZE);
+	len = sysfs_attr_get_value(attr_path, "timeout", attr, NAME_SIZE);
 	if (!len) {
 		condlog(3, "%s: No timeout value in sysfs", dev->devpath);
 		return 1;