From: James Bottomley <James.Bottomley@steeleye.com>
To: Oliver Neukum <oliver@neukum.name>
Cc: Mike Anderson <andmike@us.ibm.com>,
SCSI Mailing List <linux-scsi@vger.kernel.org>,
Matthew Dharm <mdharm-scsi@one-eyed-alien.net>
Subject: Re: [PATCH / RFC] scsi_set_host_offline
Date: 05 Mar 2003 10:52:12 -0600 [thread overview]
Message-ID: <1046883135.1784.23.camel@mulgrave> (raw)
In-Reply-To: <200303050012.35309.oliver@neukum.name>
On Tue, 2003-03-04 at 17:12, Oliver Neukum wrote:
> It seems to me that there's a race with scan_scsis() and scan_scsis_single()
> which cannot be closed with failing queuecommand, as there's a window where
> the INQUIRY has succeeded but has not yet been evaluated by the SCSI layer.
Consider the offline function as a work in progress. I think the model
we'll ultimately move to is to use the sysfs refcounting, so we could
call the offline function, have the device refuse all incoming requests,
but still process pending ones (which, if this is a forced remove should
fail). Then call a remove hook when the outstanding command count drops
to zero.
> I am not quite sure how slave_alloc() is involved into this, but IMHO it's
> wrong to force LLDDs to know about devices if they are hotpluggable.
> Could you clarify?
By design LLDs need to know about configured devices because they may
(although not all do) need to allocate resources to process them. The
slave configure/alloc/destroy is the interface for communicating this
information:
slave_alloc informs the LLD that we're about to try the device, so it
should set its internal queues up for an inquiry command.
If inquiry succeeds, we process the info and call slave_configure to
adjust the queue to its initial depth based on the device parameters.
If the inquiry fails, slave_destroy is called to free the allocated
resources.
For a functional device, slave_destroy is called when we remove it to
tell the LLD to destroy the resources it has allocated to handle the
device.
James
next prev parent reply other threads:[~2003-03-05 16:52 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-03-03 22:15 [PATCH / RFC] scsi_set_host_offline Mike Anderson
2003-03-04 0:03 ` Oliver Neukum
2003-03-04 20:36 ` Matthew Dharm
2003-03-04 20:57 ` Oliver Neukum
2003-03-04 22:29 ` Mike Anderson
2003-03-04 23:12 ` Oliver Neukum
2003-03-05 16:52 ` James Bottomley [this message]
2003-03-05 19:49 ` Oliver Neukum
2003-03-05 22:35 ` Mike Anderson
2003-03-06 14:33 ` Oliver Neukum
2003-03-04 0:08 ` Patrick Mansfield
2003-03-22 21:24 ` Matthew Dharm
2003-03-25 9:46 ` Mike Anderson
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=1046883135.1784.23.camel@mulgrave \
--to=james.bottomley@steeleye.com \
--cc=andmike@us.ibm.com \
--cc=linux-scsi@vger.kernel.org \
--cc=mdharm-scsi@one-eyed-alien.net \
--cc=oliver@neukum.name \
/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