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 2/3] scsi: introduce 'blocked' sysfs api
Date: Tue, 28 Mar 2023 11:06:39 -0500 [thread overview]
Message-ID: <fd703370-29be-2822-eaf7-77da2308ee19@oracle.com> (raw)
In-Reply-To: <20230328143442.2684167-3-yebin@huaweicloud.com>
On 3/28/23 9:34 AM, Ye Bin wrote:
> From: Ye Bin <yebin10@huawei.com>
>
> Introduce 'blocked' sysfs api to control scsi host blocking IO.
> Use this founction for test. Perhaps we can use this to do some fault
> recovery or firmware upgrades, as long as the driver support is good,
If it's for testing only then do people like a debugfs type of interface
is better?
If it's for actual production use like firmware upgrades and they can't
handle IO while they are doing the upgrade, then I think you need to do
more than just set a bit to prevent new IO. You also need to handle cmds
that have passed the scsi_queue_rq ready checks and have not been processed
by the driver's queuecommand. Also there are some issues like cmds can
still timeout and so you will get scsi_host_template->eh* calls still.
>
> diff --git a/include/scsi/scsi_host.h b/include/scsi/scsi_host.h
> index 587cc767bb67..3e916dbac1cb 100644
> --- a/include/scsi/scsi_host.h
> +++ b/include/scsi/scsi_host.h
> @@ -659,6 +659,9 @@ struct Scsi_Host {
> /* The transport requires the LUN bits NOT to be stored in CDB[1] */
> unsigned no_scsi2_lun_in_cdb:1;
>
> + /* True host will blocking IO */
> + unsigned host_blockio:1;
> +
Maybe rename to host_user_blocked to match the host_self_blocked naming.
I would make the comment similar to host_self_blocked's comment but
instead of the host requesting it userspace did.
> /*
> * Optional work queue to be utilized by the transport
> */
next prev parent reply other threads:[~2023-03-28 16:07 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 [this message]
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
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=fd703370-29be-2822-eaf7-77da2308ee19@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