lkml.org 
[lkml]   [2001]   [Sep]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: v2.4.9 and sequential scan
On Mon, Sep 17, 2001 at 09:07:25AM -0400, conway, heather wrote:
> Hi Alan,
> I tried two separate hosts, one with the aic7xxx driver using the AHA-2944UW
> and one with the qla2x00 driver, both running v2.4.9 attached to external
> storage. Both hosts are set to 128 for the max # of SCSI disks top be
> laoded as modules and the kernel has been compiled, but no other patches or
> tweaks were applied to the kernel. Both hosts panicked upon boot when
> trying to scan the external bus.
> The host attached to the external storage via SCSI (aic7xxx) has The host
> attached via FC with the qla2x00 has only 24 devices assigned to it. The
> qla2x00 driver reports trying to scan up to LUN 509 before timing out and
> panicking. I have tried this a few times and I've seen the host scan up to
> LUN 814 with the qla2x00 driver. I obtained a serial console trace from
> both hosts and have enclosed them.
> Any thoughts?
> Thanks for the help.
> Heather

Heather -

EMC is in the device_list[] (in scsi_scan.c) as a sparse LUN device.

I don't quite follow your information about aic7xx and SCSI storage.

Doug Ledford posted a patch for this plus one other fix in:

http://marc.theaimsgroup.com/?l=linux-kernel&m=98462326721779&w=2

If you look at the current setting of *max_dev_lun, it either jumps
around (for low values of max_scsi_luns, i.e. 1), or is incremented
by 1/2 of shpnt->max_lun until it reaches max_scsi_luns (for high
values of max_scsi_luns, i.e. 0xffffffff). It is currently modified
(for sparse LUN or force LUN devices) only when you find a LUN, but
its value is set each time not just once.

Always setting it to shpnt->max_lun is not very bad - if max_lun is
high, you are on fibre/FCP, and scanning should be very fast
compared to SCSI.

Here's a patch if you want to try it out, it also sets *max_dev_lun
for the early sparse lun check (we don't need the duplicate setting
for the second sparse lun check, but it does return 1 there, so I
left the settings of *max_dev_lun and *sparse_lun).

I've compiled but haven't run with this patch, though I've previously
compiled and run when patched against an earlier version of the
kernel (2.4.5 or so).

--
Patrick Mansfield

--- linux-2.4.9/drivers/scsi/scsi_scan.c Mon Aug 13 16:36:30 2001
+++ linux-2.4.9-maxlun/drivers/scsi/scsi_scan.c Mon Sep 17 09:29:53 2001
@@ -579,7 +579,8 @@
bflags = get_device_flags (scsi_result);

if (bflags & BLIST_SPARSELUN) {
- *sparse_lun = 1;
+ *max_dev_lun = shpnt->max_lun;
+ *sparse_lun = 1;
}
/*
* Check the peripheral qualifier field - this tells us whether LUNS
@@ -795,19 +796,7 @@
* other settings, and scan all of them.
*/
if (bflags & BLIST_SPARSELUN) {
- /*
- * Scanning MAX_SCSI_LUNS units would be a bad idea.
- * Any better idea?
- * I think we need REPORT LUNS in future to avoid scanning
- * of unused LUNs. But, that is another item.
- *
- * FIXME(eric) - perhaps this should be a kernel configurable?
- */
- if (*max_dev_lun < shpnt->max_lun)
- *max_dev_lun = shpnt->max_lun;
- else if ((max_scsi_luns >> 1) >= *max_dev_lun)
- *max_dev_lun += shpnt->max_lun;
- else *max_dev_lun = max_scsi_luns;
+ *max_dev_lun = shpnt->max_lun;
*sparse_lun = 1;
return 1;
}
@@ -816,17 +805,7 @@
* settings, and scan all of them.
*/
if (bflags & BLIST_FORCELUN) {
- /*
- * Scanning MAX_SCSI_LUNS units would be a bad idea.
- * Any better idea?
- * I think we need REPORT LUNS in future to avoid scanning
- * of unused LUNs. But, that is another item.
- */
- if (*max_dev_lun < shpnt->max_lun)
- *max_dev_lun = shpnt->max_lun;
- else if ((max_scsi_luns >> 1) >= *max_dev_lun)
- *max_dev_lun += shpnt->max_lun;
- else *max_dev_lun = max_scsi_luns;
+ *max_dev_lun = shpnt->max_lun;
return 1;
}
/*
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:03    [W:0.043 / U:0.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site