From: James Bottomley <James.Bottomley@SteelEye.com>
To: Mike Anderson <andmike@us.ibm.com>
Cc: Greg KH <greg@kroah.com>, Alan Stern <stern@rowland.harvard.edu>,
linux-usb-devel@lists.sourceforge.net,
SCSI Mailing List <linux-scsi@vger.kernel.org>,
mdharm-usb@one-eyed-alien.net
Subject: Re: [linux-usb-devel] oops on usb storage device disconnect with 2.6.14-rc1
Date: Thu, 15 Sep 2005 18:38:36 -0400 [thread overview]
Message-ID: <1126823917.4821.70.camel@mulgrave> (raw)
In-Reply-To: <20050915221946.GA28441@us.ibm.com>
On Thu, 2005-09-15 at 15:19 -0700, Mike Anderson wrote:
> A side effect of not applying Alan's previous patch that added
> SHOST_RECOVERY to the SHOST_CANCEL: state is that we will not move to the
> SHOST_CANCEL and subsequently not to SHOST_DEL state if the eh is active
> during the start of scsi_remove_host. I sent mail on the 7th indicating to
> include that state change hunk of the diff, but I guess that overlapped
> with your newer state changes.
> http://marc.theaimsgroup.com/?l=linux-scsi&m=112238726326927&w=2
Yes, but that's not really legitimate since it introduces a bifurcation
in the state machine ... when the eh terminates it will come back to
running even if it went in from cancel.
> In looking at the state model introduced by your patch I believe there may
> still be a state model race issue if the recovery completes just after
> the "if (!scsi_host_set_state(shost, SHOST_CANCEL))" call in
> scsi_remove_host (maybe I am just looking to quickly at the state
> updates).
No, that's true; there's a tiny race that can be mediated by doing
locking around the state changes ... that was one of the feedback
comments from Alan.
> I still do not understand as I asked in a previous comment why we are not
> shutting down the eh_thread in scsi_remove_host and also why simpler state
> model updates could not solve the problem.
Well, it goes back to whether we wait for the thread or not. To shut
the thread down, we also need to wait for it to complete.
As far as the state model goes, we either need to wait for the eh thread
before transitioning to cancel or introduce the extra states that
reflect the parallel eh transitions.
> I believe I also indicated that we could enhance scsi_error to shutdown
> faster during this state which should only be a performance improvement.
Yes, we could ... patches?
James
next prev parent reply other threads:[~2005-09-15 22:38 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-09-15 19:03 oops on usb storage device disconnect with 2.6.14-rc1 Greg KH
2005-09-15 19:23 ` [linux-usb-devel] " Alan Stern
2005-09-15 19:29 ` Greg KH
2005-09-15 19:57 ` James Bottomley
2005-09-15 21:08 ` [linux-usb-devel] " James Bottomley
2005-09-15 22:19 ` Mike Anderson
2005-09-15 22:38 ` James Bottomley [this message]
2005-09-15 23:55 ` [linux-usb-devel] " Mike Anderson
2005-09-16 1:46 ` James Bottomley
2005-09-16 1:52 ` [linux-usb-devel] " Alan Stern
2005-09-16 2:27 ` James Bottomley
2005-09-18 0:36 ` James Bottomley
2005-09-18 2:33 ` [linux-usb-devel] " Alan Stern
2005-09-18 20:00 ` James Bottomley
2005-09-18 0:35 ` James Bottomley
2005-09-18 20:05 ` James Bottomley
2005-09-18 20:37 ` Alan Stern
2005-09-18 22:01 ` [linux-usb-devel] " Greg KH
2005-09-18 22:34 ` Greg KH
2005-09-19 15:19 ` [linux-usb-devel] " James Bottomley
2005-09-20 14:48 ` Greg KH
2005-09-15 23:46 ` [linux-usb-devel] " Greg KH
2005-09-16 1:57 ` Alan Stern
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=1126823917.4821.70.camel@mulgrave \
--to=james.bottomley@steeleye.com \
--cc=andmike@us.ibm.com \
--cc=greg@kroah.com \
--cc=linux-scsi@vger.kernel.org \
--cc=linux-usb-devel@lists.sourceforge.net \
--cc=mdharm-usb@one-eyed-alien.net \
--cc=stern@rowland.harvard.edu \
/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