From: Christoph Hellwig <hch@lst.de>
To: Martin Wilck <mwilck@suse.com>
Cc: Christoph Hellwig <hch@lst.de>,
"Martin K. Petersen" <martin.petersen@oracle.com>,
Ming Lei <ming.lei@redhat.com>,
Bart Van Assche <Bart.VanAssche@sandisk.com>,
James Bottomley <jejb@linux.vnet.ibm.com>,
linux-scsi@vger.kernel.org, linux-block@vger.kernel.org,
Hannes Reinecke <hare@suse.de>
Subject: Re: [PATCH v2 3/3] scsi: simplify scsi_stop_queue()
Date: Wed, 7 Jun 2023 15:34:49 +0200 [thread overview]
Message-ID: <20230607133449.GB20840@lst.de> (raw)
In-Reply-To: <e982c95ad7ee29f80e8c0ba88f0cece837e344b9.camel@suse.com> <c0563161eb613f9500e6a1cccdcff6fc64efffad.camel@suse.com>
On Wed, Jun 07, 2023 at 11:26:04AM +0200, Martin Wilck wrote:
> > cleanups:
> >
> > 1) remove scsi_internal_device_block and fold it into device_block
>
> ok
>
> > 2) move the scsi_internal_device_block in what was
>
> You mean scsi_stop_queue() here, right?
Yes.
> The reason is simple: I wasn't certain if dev_to_shost() could return
> NULL, and preferred skipping the wait over an Oops. I hear you say that
> dev_to_shost() can't go wrong, so I'll remove the NULL test.
Well, the parent device can't really go away while we have a reference
to a child. So the only case where it can return NULL is if the
passed in device isn't the child of a SCSI host, which would be a grave
programming error.
>
> > Btw, as far as I can tell scsi_target_block is never called for
> > a device that is a target device. It might be worth throwing in
> > another patch to remove support for that case and simplify things
> > further.
>
> Can we do this separately, maybe?
Sure. Would be nice to just tack into onto the end of this series
if you touch the area, though.
> On Wed, 2023-06-07 at 11:26 +0200, Martin Wilck wrote:
> > On Wed, 2023-06-07 at 07:27 +0200, Christoph Hellwig wrote:
> > >
> > > 3) remove scsi_stop_queue and open code it in the two callers,
> > > one
> > > of which currently wants nowait semantics, and one that
> > > doesn't.
> > ok
>
> Hm, scsi_stop_queue() pairs with scsi_start_queue(), do we really want
> to open-code it?
Oh well, feel free to keep it if you prefer it that way.
next prev parent reply other threads:[~2023-06-07 13:34 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-06 19:38 [PATCH v2 0/3] scsi: fixes for targets with many LUNs mwilck
2023-06-06 19:38 ` [PATCH v2 1/3] bsg: increase number of devices mwilck
2023-06-07 5:10 ` Christoph Hellwig
2023-06-06 19:38 ` [PATCH v2 2/3] scsi: sg: " mwilck
2023-06-07 5:10 ` Christoph Hellwig
2023-06-06 19:38 ` [PATCH v2 3/3] scsi: simplify scsi_stop_queue() mwilck
2023-06-07 5:27 ` Christoph Hellwig
2023-06-07 9:26 ` Martin Wilck
2023-06-07 9:36 ` Martin Wilck
2023-06-07 13:34 ` Christoph Hellwig [this message]
2023-06-07 14:05 ` Bart Van Assche
2023-06-07 14:08 ` Christoph Hellwig
2023-06-07 15:38 ` Martin Wilck
2023-06-07 16:39 ` Bart Van Assche
2023-06-07 17:56 ` Martin Wilck
2023-06-06 20:33 ` [PATCH v2 0/3] scsi: fixes for targets with many LUNs Bart Van Assche
2023-06-07 1:20 ` Ming Lei
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=20230607133449.GB20840@lst.de \
--to=hch@lst.de \
--cc=Bart.VanAssche@sandisk.com \
--cc=hare@suse.de \
--cc=jejb@linux.vnet.ibm.com \
--cc=linux-block@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=ming.lei@redhat.com \
--cc=mwilck@suse.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.