lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 16 Nov 2021 20:01:59 +0800
From:   Wu Bo <wubo40@...wei.com>
To:     brookxu <brookxu.cn@...il.com>, <jejb@...ux.ibm.com>,
        <martin.petersen@...cle.com>
CC:     <hch@...radead.org>, <linux-scsi@...r.kernel.org>,
        <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2] scsi: core: use eh_timeout to timeout start_unit
 command

On 2021/11/10 9:23, brookxu wrote:
> From: Chunguang Xu <brookxu@...cent.com>
> 
> In some abnormal scenarios, STU may timeout. The recovery
> time of 30 seconds is relatively large. Now we need to modify
> rq_timeout to adjust STU timeout value, but it will affect the
> actual IO.
> 
> commit 9728c0814ecb ("[SCSI] make scsi_eh_try_stu use block
> timeout") use rq_timeout to timeout the STU command, but after
> commit 0816c9251a71 ("[SCSI] Allow error handling timeout to
> be specified") eh_timeout will init to SCSI_DEFAULT_EH_TIMEOUT,
> so it is more reasonable to use eh_timeout as the timeout value
> of STU command. In this way, we can uniformly control recovery
> time through eh_timeout.
> 
> Signed-off-by: Chunguang Xu <brookxu@...cent.com>
> ---
> v2: Update commit log and fix some format issues.
> 
>   drivers/scsi/scsi_error.c | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/scsi/scsi_error.c b/drivers/scsi/scsi_error.c
> index a531336..a665318 100644
> --- a/drivers/scsi/scsi_error.c
> +++ b/drivers/scsi/scsi_error.c
> @@ -1404,7 +1404,8 @@ static int scsi_eh_try_stu(struct scsi_cmnd *scmd)
>   		enum scsi_disposition rtn = NEEDS_RETRY;
>   
>   		for (i = 0; rtn == NEEDS_RETRY && i < 2; i++)
> -			rtn = scsi_send_eh_cmnd(scmd, stu_command, 6, scmd->device->request_queue->rq_timeout, 0);
> +			rtn = scsi_send_eh_cmnd(scmd, stu_command, 6,
> +						scmd->device->eh_timeout, 0);
>   
>   		if (rtn == SUCCESS)
>   			return 0;
> 

Reviewed-by: Wu Bo <wubo40@...wei.com>

-- 
Wu Bo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ