From: Wu Bo <wubo40@huawei.com>
To: brookxu <brookxu.cn@gmail.com>, <jejb@linux.ibm.com>,
<martin.petersen@oracle.com>
Cc: <hch@infradead.org>, <linux-scsi@vger.kernel.org>,
<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2] scsi: core: use eh_timeout to timeout start_unit command
Date: Tue, 16 Nov 2021 20:01:59 +0800 [thread overview]
Message-ID: <34b23c4f-65b0-4c01-4148-d536732b3aeb@huawei.com> (raw)
In-Reply-To: <1636507412-21678-1-git-send-email-brookxu.cn@gmail.com>
On 2021/11/10 9:23, brookxu wrote:
> From: Chunguang Xu <brookxu@tencent.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@tencent.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@huawei.com>
--
Wu Bo
next prev parent reply other threads:[~2021-11-16 12:04 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-10 1:23 brookxu
2021-11-10 5:41 ` Christoph Hellwig
2021-11-16 12:01 ` Wu Bo [this message]
2021-11-19 3:16 ` Martin K. Petersen
2021-11-23 3:48 ` Martin K. Petersen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=34b23c4f-65b0-4c01-4148-d536732b3aeb@huawei.com \
--to=wubo40@huawei.com \
--cc=brookxu.cn@gmail.com \
--cc=hch@infradead.org \
--cc=jejb@linux.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®