[RFC PATCH 3/4] libmultipath: fix timeouts for detect_alua()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



detect_alua calls prioritizer functions that expect the timeout to be in
milliseconds instead of seconds. Fix this and also respect the
checker_timeout setting.

Signed-off-by: Benjamin Marzinski <bmarzins@xxxxxxxxxx>
---
 libmultipath/discovery.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/libmultipath/discovery.c b/libmultipath/discovery.c
index 2b1a11d5..9392134f 100644
--- a/libmultipath/discovery.c
+++ b/libmultipath/discovery.c
@@ -1016,15 +1016,17 @@ detect_alua(struct path * pp)
 	int ret;
 	int tpgs;
 	unsigned int timeout;
+	struct config *conf;
 
 
 	if (pp->bus != SYSFS_BUS_SCSI) {
 		pp->tpgs = TPGS_NONE;
 		return;
 	}
-
-	if (sysfs_get_timeout(pp, &timeout) <= 0)
-		timeout = DEF_TIMEOUT;
+	conf = get_multipath_config();
+	timeout = conf->checker_timeout * 1000;
+	put_multipath_config(conf);
+	timeout = get_prio_timeout(pp, timeout);
 
 	tpgs = get_target_port_group_support(pp, timeout);
 	if (tpgs == -RTPG_INQUIRY_FAILED)
-- 
2.17.2

--
dm-devel mailing list
dm-devel@xxxxxxxxxx
https://listman.redhat.com/mailman/listinfo/dm-devel




[Index of Archives]     [DM Crypt]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite Discussion]     [KDE Users]     [Fedora Docs]

  Powered by Linux