From: Mike Christie <michael.christie@oracle.com>
To: Ye Bin <yebin@huaweicloud.com>,
jejb@linux.ibm.com, martin.petersen@oracle.com,
linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: Ye Bin <yebin10@huawei.com>
Subject: Re: [PATCH v2 3/3] scsi: blocking IO when host is set blocked
Date: Tue, 28 Mar 2023 10:56:33 -0500 [thread overview]
Message-ID: <b16d9ae7-625d-c5b1-d7bb-42bac8445125@oracle.com> (raw)
In-Reply-To: <20230328143442.2684167-4-yebin@huaweicloud.com>
On 3/28/23 9:34 AM, Ye Bin wrote:
> From: Ye Bin <yebin10@huawei.com>
>
> As previous patch introduce 'blocked' sysfs api to set 'host_blockio'.
> If 'host_blockio' is true will blocking IO.
>
> Signed-off-by: Ye Bin <yebin10@huawei.com>
> ---
> drivers/scsi/scsi_lib.c | 2 ++
> include/scsi/scsi_host.h | 5 +++++
> 2 files changed, 7 insertions(+)
>
> diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c
> index b7c569a42aa4..20d618300a46 100644
> --- a/drivers/scsi/scsi_lib.c
> +++ b/drivers/scsi/scsi_lib.c
> @@ -1724,6 +1724,8 @@ static blk_status_t scsi_queue_rq(struct blk_mq_hw_ctx *hctx,
> }
>
> ret = BLK_STS_RESOURCE;
> + if (unlikely(scsi_host_blocked(shost)))
> + goto out_put_budget;
You can just put this check in scsi_host_queue_ready with the
host_self_blocked check.
prev parent reply other threads:[~2023-03-28 15:57 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-28 14:34 [PATCH v2 0/3] limit set the host state by sysfs Ye Bin
2023-03-28 14:34 ` [PATCH v2 1/3] scsi: forbid to set scsi " Ye Bin
2023-03-28 14:34 ` [PATCH v2 2/3] scsi: introduce 'blocked' sysfs api Ye Bin
2023-03-28 16:06 ` Mike Christie
2023-03-28 14:34 ` [PATCH v2 3/3] scsi: blocking IO when host is set blocked Ye Bin
2023-03-28 15:56 ` Mike Christie [this message]
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=b16d9ae7-625d-c5b1-d7bb-42bac8445125@oracle.com \
--to=michael.christie@oracle.com \
--cc=jejb@linux.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=yebin10@huawei.com \
--cc=yebin@huaweicloud.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