[549] in linux-scsi channel archive
Re: Errors & Unit Attention
daemon@ATHENA.MIT.EDU (Stephen D. Williams)
Sat Aug 26 20:41:41 1995
From: sdw@lig.net (Stephen D. Williams)
To: eric@aib.com (Eric Youngdale)
Date: Sat, 26 Aug 1995 15:32:13 -0400 (EDT)
Cc: lnz@dandelion.com, linux-scsi@vger.rutgers.edu
In-Reply-To: <m0shKcL-0009WOC@aib.com> from "Eric Youngdale" at Aug 12, 95 01:45:00 pm
Better a late comment than never...
This is one of those areas that separates a good OS from a great one:
SCSI can electrically and protocol wise handle hot connection and disconnection
of drives, but many OS's (if not most) don't retry operations sufficiently
to handle it.
IMHO, the driver should be able to retry operations to a large degree.
Detecting the situation where drives are disconnected temporarily
and then come back online is very important and useful.
> >I don't think it's quite this simple. As I read the code in sd.c, this only
> >happens for disk devices that are marked "removable". An ordinary disk falls
> >through that case and eventually prints an error message. I'm still not clear
> >on what happens after that error, though. Processes frequently hang with a "D"
> >status, and all further file system access to the disk fails. Why?
>
> This is all true. If this happens for a disk that is marked
> not removeable, I suspect a bug somewhere.
>
> The general idea is that further commands will be blocked
> until the command that was executing and caused an error completes.
> There are a couple of ways of debugging this. One is to build the
> user-mode simulator and program the scsi_debug driver to simulate the
> disk change, and the other is to simply try and debug the running
> kernel. To start with, it would probably be easier to debug the
> kernel.
>
> The place to start is in sd.c in the function rw_intr(). This
> is the interrupt service routine, and we should come up here when we
> see the unit attention. Offhand it looks a bit fishy to me at the moment,
> and I suspect that this is where the problem lies. Let me study it some,
> and I will get back to you.
>
> -Eric
>
--
Stephen D. Williams 25Feb1965 VW,OH (FBI ID) sdw@lig.net http://www.lig.net/sdw
Consultant, Vienna,VA Mar95- 703-918-1491W 43392 Wayside Cir.,Ashburn, VA 22011
OO/Unix/Comm/NN ICBM/GPS: 39 02 37N, 77 29 16W home, 38 54 04N, 77 15 56W
Pres.: Concinnous Consulting,Inc.;SDW Systems;Local Internet Gateway Co.;28May95