@@ -114,7 +114,7 @@ int libcheck_check (struct checker * c)
io_hdr.dxferp = sense_buffer;
io_hdr.cmdp = inqCmdBlk;
io_hdr.sbp = sb;
- io_hdr.timeout = c->timeout;
+ io_hdr.timeout = c->timeout * 1000;
io_hdr.pack_id = 0;
if (ioctl(c->fd, SG_IO, &io_hdr) < 0) {
MSG(c, "emc_clariion_checker: sending query command failed");
@@ -70,7 +70,7 @@ do_inq(int sg_fd, int cmddt, int evpd, unsigned int pg_op,
io_hdr.dxferp = resp;
io_hdr.cmdp = inqCmdBlk;
io_hdr.sbp = sense_b;
- io_hdr.timeout = timeout;
+ io_hdr.timeout = timeout * 1000;
if (ioctl(sg_fd, SG_IO, &io_hdr) < 0)
return 1;
@@ -111,7 +111,7 @@ do_tur (int fd, unsigned int timeout)
io_hdr.dxfer_direction = SG_DXFER_NONE;
io_hdr.cmdp = turCmdBlk;
io_hdr.sbp = sense_buffer;
- io_hdr.timeout = timeout;
+ io_hdr.timeout = timeout * 1000;
io_hdr.pack_id = 0;
if (ioctl(fd, SG_IO, &io_hdr) < 0)
@@ -53,7 +53,7 @@ sg_read (int sg_fd, unsigned char * buff, int buff_len,
io_hdr.dxferp = buff;
io_hdr.mx_sb_len = sense_len;
io_hdr.sbp = sense;
- io_hdr.timeout = timeout;
+ io_hdr.timeout = timeout * 1000;
io_hdr.pack_id = (int)start_block;
if (diop && *diop)
io_hdr.flags |= SG_FLAG_DIRECT_IO;
@@ -74,7 +74,7 @@ int libcheck_init (struct checker * c)
io_hdr.dxferp = ¤t;
io_hdr.cmdp = cmd;
io_hdr.sbp = sense_b;
- io_hdr.timeout = c->timeout;
+ io_hdr.timeout = c->timeout * 1000;
if (ioctl(c->fd, SG_IO, &io_hdr) < 0)
goto out;
@@ -150,7 +150,7 @@ retry:
io_hdr.dxferp = resp;
io_hdr.cmdp = inqCmdBlk;
io_hdr.sbp = sense_b;
- io_hdr.timeout = timeout;
+ io_hdr.timeout = timeout * 1000;
if (ioctl(sg_fd, SG_IO, &io_hdr) < 0)
return 1;
@@ -116,7 +116,7 @@ tur_check(int fd, unsigned int timeout, char *msg)
io_hdr.dxfer_direction = SG_DXFER_NONE;
io_hdr.cmdp = turCmdBlk;
io_hdr.sbp = sense_buffer;
- io_hdr.timeout = timeout;
+ io_hdr.timeout = timeout * 1000;
io_hdr.pack_id = 0;
if (ioctl(fd, SG_IO, &io_hdr) < 0) {
TUR_MSG(msg, MSG_TUR_DOWN);
@@ -204,7 +204,7 @@ sysfs_get_timeout(struct path *pp, unsigned int *timeout)
return 1;
}
- *timeout = t * 1000;
+ *timeout = t;
return 0;
}
@@ -14,7 +14,7 @@
#endif
#ifndef DEF_TIMEOUT
-#define DEF_TIMEOUT 300000
+#define DEF_TIMEOUT 30
#endif
/*
@@ -347,8 +347,8 @@ select_checker(struct path *pp)
pp->dev, checker_name(c));
out:
if (conf->checker_timeout) {
- c->timeout = conf->checker_timeout * 1000;
- condlog(3, "%s: checker timeout = %u ms (config file default)",
+ c->timeout = conf->checker_timeout;
+ condlog(3, "%s: checker timeout = %u s (config file default)",
pp->dev, c->timeout);
}
else if (pp->udev && sysfs_get_timeout(pp, &c->timeout) == 0)
Commit 8d3f07da changed the internal value for checker_timeout to be in milliseconds, which wasn't reflected in the tur checker. So better scale it back to seconds, and change the callers to scale it to milliseconds where appropriate. Signed-off-by: Hannes Reinecke <hare@suse.de> --- libmultipath/checkers/emc_clariion.c | 2 +- libmultipath/checkers/hp_sw.c | 4 ++-- libmultipath/checkers/libsg.c | 2 +- libmultipath/checkers/rdac.c | 4 ++-- libmultipath/checkers/tur.c | 2 +- libmultipath/discovery.c | 2 +- libmultipath/discovery.h | 2 +- libmultipath/propsel.c | 4 ++-- 8 files changed, 11 insertions(+), 11 deletions(-)