From: Willem Riede <wrlk@riede.org>
To: Zwane Mwaikambo <zwane@holomorphy.com>
Cc: dan carpenter <d_carpenter@sbcglobal.net>,
Linux Kernel <linux-kernel@vger.kernel.org>
Subject: Re: Any hope for ide-scsi (error handling)?
Date: Sat, 15 Mar 2003 16:01:20 -0500 [thread overview]
Message-ID: <20030315210120.GI7082@linnie.riede.org> (raw)
In-Reply-To: <Pine.LNX.4.50.0303151519240.9158-100000@montezuma.mastecende.com>; from zwane@holomorphy.com on Sat, Mar 15, 2003 at 15:23:04 -0500
On 2003.03.15 15:23 Zwane Mwaikambo wrote:
> On Sat, 15 Mar 2003, dan carpenter wrote:
>
> > > Apart from the schedule with the ide_lock held, what is that code actually
> > > doing?
> > >
> > > Zwane
> >
> > Hm... Good question. I have no idea what the while loop is for.
>
> I suppose the magik is in the comments;
>
> /* first null the handler for the drive and let any process
> * doing IO (on another CPU) run to (partial) completion
> * the lock prevents processing new requests */
>
Indeed. If you get there, the command in progress is hung.
To be able to restart the device, the old command needs to be
aborted. But that is an inherently racy undertaking.
Nominally, I just want to set HWGROUP(drive)->handler = NULL.
But there is a small chance, that there is actually (interrupt)
activity going on for the command, which would result in a new
entry in HWGROUP(drive)->handler popping up after it is cleared.
The loop as programmed significantly increases the odds that
the old command is really aborted.
It may not be elegant to schedule(1) with the lock taken, but it
does work.
However, my latest patch doesn't seem to be applied, since in my
version I have a set_current_state(TASK_INTERRUPTIBLE); before
the schedule.
Regards, Willem Riede.
next prev parent reply other threads:[~2003-03-15 20:50 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-03-15 18:55 Zwane Mwaikambo
2003-03-15 2:05 ` dan carpenter
2003-03-15 19:53 ` Zwane Mwaikambo
2003-03-15 2:52 ` dan carpenter
2003-03-15 20:23 ` Zwane Mwaikambo
2003-03-15 21:01 ` Willem Riede [this message]
2003-03-15 4:43 ` dan carpenter
2003-03-15 21:11 ` Zwane Mwaikambo
2003-03-15 22:29 ` Willem Riede
2003-03-16 1:23 ` Alan Cox
2003-03-16 0:55 ` Willem Riede
2003-03-16 21:41 ` Alan Cox
2003-03-15 20:25 ` bert hubert
2003-03-15 20:41 ` Zwane Mwaikambo
2003-03-15 20:55 ` Zwane Mwaikambo
2003-03-16 1:05 ` Alan Cox
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=20030315210120.GI7082@linnie.riede.org \
--to=wrlk@riede.org \
--cc=d_carpenter@sbcglobal.net \
--cc=linux-kernel@vger.kernel.org \
--cc=zwane@holomorphy.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®