From: James Bottomley <jejb@linux.ibm.com>
To: Bart Van Assche <bvanassche@acm.org>,
Tomas Henzl <thenzl@redhat.com>,
"Martin K . Petersen" <martin.petersen@oracle.com>
Cc: Jaegeuk Kim <jaegeuk@kernel.org>,
Avri Altman <avri.altman@wdc.com>,
Adrian Hunter <adrian.hunter@intel.com>,
linux-scsi@vger.kernel.org, Christoph Hellwig <hch@lst.de>,
Ming Lei <ming.lei@redhat.com>, Hannes Reinecke <hare@suse.de>,
Mike Christie <michael.christie@oracle.com>
Subject: Re: [PATCH v2 1/4] scsi: sd: Let sd_shutdown() fail future I/O
Date: Wed, 19 Apr 2023 14:33:46 -0400 [thread overview]
Message-ID: <3f1cb05d70ea9a060951b8b2cd4ce84d8fb62174.camel@linux.ibm.com> (raw)
In-Reply-To: <5429f579-1512-b6b5-771a-70f3d27959b2@acm.org>
On Wed, 2023-04-19 at 10:58 -0700, Bart Van Assche wrote:
> On 4/19/23 07:02, James Bottomley wrote:
> > device_shutdown() goes in reverse devices_kset->list order, so it
> > looks like it would do the PCI device then the SCSI device then the
> > ULD then block, so we can use the queues in SCSI for emergency
> > actions (like flush or stop) before block goes down. Although this
> > isn't guaranteed; there are things, like device_link_add, which
> > reorder this kset, so we'd need to make sure the above assumption
> > is correct.
>
> Hi James,
>
> My understanding is that both the block device associated with
> /dev/sd<x> and the struct scsi_disk associated with the same SCSI
> device have the sdev_gendev member of struct scsi_device as parent.
> In other words, without creating device links, there are no
> guarantees about the order in which the .shutdown() methods of struct
> block_device.bd_device and struct scsi_disk.disk_dev are called.
> Adding device links seems like an unnecessary complexity to me. Hence
> my preference to make sd_shutdown() responsible for quiescing future
> SCSI command activity.
So if we can't reliably get it right, let's not do it at all. The
previous argument you made was about problems with I/O to shutdown PCI
devices. That's not SCSI specific, so either we fix it for everything
or decide it's not really a problem for anything.
James
next prev parent reply other threads:[~2023-04-19 18:34 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-17 23:06 [PATCH v2 0/4] SCSI core and UFS patches for kernel v6.4 Bart Van Assche
2023-04-17 23:06 ` [PATCH v2 1/4] scsi: sd: Let sd_shutdown() fail future I/O Bart Van Assche
2023-04-18 4:37 ` Ming Lei
2023-04-18 14:09 ` Bart Van Assche
2023-04-18 5:06 ` Christoph Hellwig
2023-04-18 14:36 ` James Bottomley
2023-04-18 18:37 ` Bart Van Assche
2023-04-19 2:34 ` James Bottomley
2023-04-19 13:36 ` Tomas Henzl
2023-04-19 14:02 ` James Bottomley
2023-04-19 17:58 ` Bart Van Assche
2023-04-19 18:33 ` James Bottomley [this message]
2023-04-19 19:24 ` Bart Van Assche
2023-04-19 19:29 ` James Bottomley
2023-04-17 23:06 ` [PATCH v2 2/4] scsi: ufs: Simplify ufshcd_wl_shutdown() Bart Van Assche
2023-04-18 13:45 ` Adrian Hunter
2023-04-18 14:06 ` Bart Van Assche
2023-04-18 14:13 ` Adrian Hunter
2023-04-18 20:14 ` Bart Van Assche
2023-04-19 5:23 ` Adrian Hunter
2023-04-17 23:06 ` [PATCH v2 3/4] scsi: ufs: Increase the START STOP UNIT timeout from one to ten seconds Bart Van Assche
2023-04-18 7:30 ` Adrian Hunter
2023-04-18 7:57 ` Stanley Chu
2023-04-17 23:06 ` [PATCH v2 4/4] scsi: ufs: Fix handling of lrbp->cmd Bart Van Assche
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=3f1cb05d70ea9a060951b8b2cd4ce84d8fb62174.camel@linux.ibm.com \
--to=jejb@linux.ibm.com \
--cc=adrian.hunter@intel.com \
--cc=avri.altman@wdc.com \
--cc=bvanassche@acm.org \
--cc=hare@suse.de \
--cc=hch@lst.de \
--cc=jaegeuk@kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=michael.christie@oracle.com \
--cc=ming.lei@redhat.com \
--cc=thenzl@redhat.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