From: Andrey Borzenkov <arvidjaar@mail.ru>
To: Mike Anderson <andmike@us.ibm.com>
Cc: linux-kernel@vger.kernel.org, linux-scsi@vger.kernel.org,
James Bottomley <James.Bottomley@steeleye.com>
Subject: Re: 2.6.1: media change check fails for busy unplugged device
Date: Mon, 26 Jan 2004 22:16:42 +0300 [thread overview]
Message-ID: <200401262216.42966.arvidjaar@mail.ru> (raw)
In-Reply-To: <20040119233641.GA1859@beaverton.ibm.com>
On Tuesday 20 January 2004 02:36, Mike Anderson wrote:
> Andrey Borzenkov [arvidjaar@mail.ru] wrote:
> > If we unplug busy device (consider mounted USB stick) media change check
> > always returns true (no media change happened). It happens because
> >
> > - device state is set to SDEV_DEL and scsi_prep_fn silently kills any
> > request including TEST_UNIT_READY sent by sd_media_changed without
> > propagating any information back to caller
>
> The silently kill would appear to be the issue. The addition of any
> number of additional checks prior to calling scsi_ioctl would not ensure
> that as soon as the last check is done the device state has not changed.
>
But why sdev->online remains set after device has been deleted? It is
definitely cannot accept any command after that point?
Is it possible to clear sdev->online in scsi_remove_device? That would solve
the problem.
thank you
-andrey
> We need a change in scsi_wait_req to differentiate that we where not woken
> up from scsi_wait_done, but from end_that_request_last.
>
> One way would be to check if rq_status == RQ_SCSI_DONE. I did not see
> anything on the request to indicate it was BLKPREP_KILL'd.
>
> James has worked more on the scsi_prep_fn so maybe he has another
> suggestion.
>
> -andmike
> --
> Michael Anderson
> andmike@us.ibm.com
next prev parent reply other threads:[~2004-01-26 19:20 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-01-18 18:41 2.6.1: media change check fails for busy unplugged device Andrey Borzenkov
2004-01-19 23:36 ` Mike Anderson
2004-01-26 19:16 ` Andrey Borzenkov [this message]
2004-01-29 9:30 ` Mike Anderson
2004-01-31 13:53 ` James Bottomley
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=200401262216.42966.arvidjaar@mail.ru \
--to=arvidjaar@mail.ru \
--cc=James.Bottomley@steeleye.com \
--cc=andmike@us.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
/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.