[2344] in linux-scsi channel archive
Re: "read defect list" with 2.0.30-pre7 and patch Aug19
daemon@ATHENA.MIT.EDU (Doug Ledford)
Mon Aug 25 16:33:19 1997
To: "Ulrich Windl" <ulrich.windl@rz.uni-regensburg.de>
cc: Gerard Roudier <groudier@club-internet.fr>,
Doug Ledford <dledford@dialnet.net>, linux-scsi@vger.rutgers.edu
In-reply-to: Your message of "Mon, 25 Aug 1997 10:53:22 +0200."
<62BB3D8755E@rkdvmks1.ngate.uni-regensburg.de>
Date: Mon, 25 Aug 1997 15:26:29 -0500
From: Doug Ledford <dledford@dialnet.net>
--------
> Well, that's why I reported the problem. I think the system call
> should return an error instead of killing the system.
That's the net effect of the patch I sent you.
> But still, I
> would not object if I could finally read my entire defect list.
>
> Being not SCSI expert I can't see why this problem is only related to
> read defects list. Aren't there other generic SCSI calls that would
> have the same problem?
Typically, no. The read defects list is a command sent through the SCSI
ioctl interface. Most scsi commands come from either reading/writing the
block devices via the filesystem or tape devices through st.c. Either way,
we always know what exactly it is we are wanting to get in terms of size.
The defects list is an exception becuase we don't know how big it actually
is when we ask for it.
> The original intention WHY I wanted to read the defect list is to
> check for grown defects. HP does this in an automated job every
> night, and we had a really bad series of ST15150W (8 of 16 disks
> replaced within one year).
If you ask me the best answer to this particular problem is a read_defects
ioctl or a modification to scsi_ioctl or generics interface to allow
arbitrary length command buffers up to the full SG size. The reason I say
that is we really need to do this in two calls. One, with a very short
buffer just to get the size of the defects table, then another with a buffer
that we just allocated that can hold the number of entries returned by our
first call. If that means we need a 64K buffer to hold all of the defects
on a 23GB drive, then that's what we need.
--
*****************************************************************************
* Doug Ledford * Unix, Novell, Dos, Windows 3.x, *
* dledford@dialnet.net 873-DIAL * WfW, Windows 95 & NT Technician *
* PPP access $14.95/month *****************************************
* Springfield, MO and surrounding * Usenet news, e-mail and shell account.*
* communities. Sign-up online at * Web page creation and hosting, other *
* 873-9000 V.34 * services available, call for info. *
*****************************************************************************