Re: [dm-devel] [PATCH 2/7] multipath: fix DEF_TIMEOUT use

2018-02-08 Thread Martin Wilck
On Wed, 2018-02-07 at 16:49 -0600, Benjamin Marzinski wrote:
> DEF_TIMEOUT is specified in seconds. The io_hdr timeout is specified
> in
> milliseconds, so we need to convert it. Multipath should be waiting
> longer than 30 milliseconds here. If there are concerns that 30
> seconds
> may be too long, we could always make this configurable, using
> conf->checker_timeout if set.
> 
> Signed-off-by: Benjamin Marzinski 
> ---
>  libmultipath/discovery.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Reviewed-by: Martin Wilck 

> 
> diff --git a/libmultipath/discovery.c b/libmultipath/discovery.c
> index 4b31dde..f118800 100644
> --- a/libmultipath/discovery.c
> +++ b/libmultipath/discovery.c
> @@ -766,7 +766,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 = DEF_TIMEOUT;
> + io_hdr.timeout = DEF_TIMEOUT * 1000;
>  
>   if (ioctl(sg_fd, SG_IO, &io_hdr) < 0)
>   return -1;

-- 
Dr. Martin Wilck , Tel. +49 (0)911 74053 2107
SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton
HRB 21284 (AG Nürnberg)

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

[dm-devel] [PATCH 2/7] multipath: fix DEF_TIMEOUT use

2018-02-07 Thread Benjamin Marzinski
DEF_TIMEOUT is specified in seconds. The io_hdr timeout is specified in
milliseconds, so we need to convert it. Multipath should be waiting
longer than 30 milliseconds here. If there are concerns that 30 seconds
may be too long, we could always make this configurable, using
conf->checker_timeout if set.

Signed-off-by: Benjamin Marzinski 
---
 libmultipath/discovery.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libmultipath/discovery.c b/libmultipath/discovery.c
index 4b31dde..f118800 100644
--- a/libmultipath/discovery.c
+++ b/libmultipath/discovery.c
@@ -766,7 +766,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 = DEF_TIMEOUT;
+   io_hdr.timeout = DEF_TIMEOUT * 1000;
 
if (ioctl(sg_fd, SG_IO, &io_hdr) < 0)
return -1;
-- 
2.7.4

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