From: James Smart <James.Smart@Emulex.Com>
To: Stefan Richter <stefanr@s5r6.in-berlin.de>
Cc: linux-scsi@vger.kernel.org
Subject: Re: [Comments Needed] scan vs remove_target deadlock
Date: Thu, 13 Apr 2006 11:21:04 -0400 [thread overview]
Message-ID: <443E6C60.3050501@emulex.com> (raw)
In-Reply-To: <443B6E90.4020705@s5r6.in-berlin.de>
Thanks Stefan...
> Another driver which uses a block/unblock interface is sbp2. It blocks
> shosts (because one shost == one SBP-2 LU at the moment) during 1394 bus
> reset/ 1394 nodes rescan/ SBP-2 reconnect phases. I learned the hard way
> that an shost (or sdev if you will) *must not be blocked* when an shost
> (or sdev) is to be removed.
True. The FC transport explicitly performs an unblock prior to the remove
call. However, the remove is then deadlocking on the scan_mutext vs the
pending request queue (still trying to find out why it's really stuck).
> IOW before a transport may remove an sdev or shost, it has to unblock it
> and it also has to make sure that all commands that were enqueued before
> the blocking are being completed.
True. The FC transport explicitly performs an unblock prior to the remove
call. What I'm seeing would align with "not" making sure the prior queued
commands are completed before it removes.
> But isn't it rather a responsibility
> of the SCSI core to get a LU's or target's state transitions right?
Agreed. The real issue is - define the window for prior queued commands.
You may flush all that are there right now, but that may immediately
requeue a retry, etc - which means you have to start all over.
> When
> an sdev is "blocked" and the transport tells the core to transition it
> to "to be removed", then the core should know that the sdev's LU cannot
> be reached anymore and act accordingly.
I would assume - that's what we'll eventually get to, with the mutex
being the first onion layer to get pulled.
-- james s
next prev parent reply other threads:[~2006-04-13 15:21 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-04-10 18:25 [Comments Needed] scan vs remove_target deadlock James Smart
2006-04-11 4:03 ` Mike Christie
2006-04-13 15:14 ` James Smart
2006-04-14 4:23 ` Mike Christie
2006-04-14 10:19 ` James Smart
2006-04-14 17:48 ` Mike Christie
2006-04-14 17:58 ` Mike Christie
2006-04-11 8:53 ` Stefan Richter
2006-04-13 15:21 ` James Smart [this message]
2006-04-14 19:16 ` Stefan Richter
2006-04-18 20:09 ` Michael Reed
2006-04-18 21:35 ` James Smart
2006-04-19 15:34 ` Michael Reed
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=443E6C60.3050501@emulex.com \
--to=james.smart@emulex.com \
--cc=linux-scsi@vger.kernel.org \
--cc=stefanr@s5r6.in-berlin.de \
/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;
as well as URLs for NNTP newsgroup(s).