From: Doug Ledford <dledford@redhat.com>
To: Michael Heinz <mheinz@infiniconsys.com>
Cc: linux-scsi <linux-scsi@vger.kernel.org>
Subject: Re: Possible bug handling bad I/Os?
Date: Thu, 29 Aug 2002 12:41:42 -0400 [thread overview]
Message-ID: <20020829124142.D31625@redhat.com> (raw)
In-Reply-To: <B9939B24.2BFC%mheinz@infiniconsys.com>; from mheinz@infiniconsys.com on Thu, Aug 29, 2002 at 09:34:28AM -0400
On Thu, Aug 29, 2002 at 09:34:28AM -0400, Michael Heinz wrote:
> The last thing to happen seemed to be that my driver would get a call to
> queue_command while I knew the connection was down. Since I knew the
> connection was down I would simply immediately return an error and do
> nothing else.
[ You didn't specify your kernel version, so the below comment is for 2.4
kernels, on 2.5 kernels all drivers are treated as new eh drivers ]
Does your driver use the new eh code? If not, then this is your problem.
Non new eh code based drivers are not allowed to fail a queue_command
call, and the return value isn't checked.
> So, my question is: Is this the right way to handle this problem, or is
> there another issue? At least part of the SCSI system knows the command was
> bad, because it never tries to abort it - but it never issues another
> command, either.
Summary. If your driver is not a new eh code driver (it still uses the
old recovery interface), then queue_command() may not fail and if you need
to bail on a command, then you might as well just call the done() function
with this command as the argument from queue_command then return. If it
is a new eh driver, then you need to make sure you never bail out on a
request when there are no commands currently active/busy on that device or
else the new queue code will quit sending commands to this device
permanently.
--
Doug Ledford <dledford@redhat.com> 919-754-3700 x44233
Red Hat, Inc.
1801 Varsity Dr.
Raleigh, NC 27606
next prev parent reply other threads:[~2002-08-29 16:41 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-08-29 13:34 Possible bug handling bad I/Os? Michael Heinz
2002-08-29 16:41 ` Doug Ledford [this message]
2002-08-29 16:58 ` Michael Heinz
2002-08-29 17:11 ` Michael Heinz
2002-08-29 17:27 ` Doug Ledford
2002-08-29 19:16 ` Luben Tuikov
2002-08-29 19:43 ` Doug Ledford
-- strict thread matches above, loose matches on Subject: below --
2002-08-29 15:12 Martin Peschke3
2002-08-29 15:14 ` Michael Heinz
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=20020829124142.D31625@redhat.com \
--to=dledford@redhat.com \
--cc=linux-scsi@vger.kernel.org \
--cc=mheinz@infiniconsys.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