multipath: get right sysfs value for checker_timeout
authorBenjamin Marzinski <bmarzins@redhat.com>
Wed, 5 Oct 2011 04:15:05 +0000 (23:15 -0500)
committerChristophe Varoqui <christophe.varoqui@opensvc.com>
Wed, 5 Oct 2011 05:53:50 +0000 (07:53 +0200)
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

Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
libmultipath/discovery.c

index 1de5353..dac97a3 100644 (file)
@@ -166,7 +166,7 @@ sysfs_get_timeout(struct sysfs_device *dev, unsigned int *timeout)
        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;