public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
* Patches for SCSI scanning
@ 2004-04-18 18:57 Kurt Garloff
  2004-04-18 23:16 ` James Bottomley
  2004-04-20 10:24 ` Fabien Salvi
  0 siblings, 2 replies; 42+ messages in thread
From: Kurt Garloff @ 2004-04-18 18:57 UTC (permalink / raw)
  To: Linux SCSI list; +Cc: James Bottomley, Andrew Morton

[-- Attachment #1: Type: text/plain, Size: 1131 bytes --]

Hi,

at SUSE, the way that Linux scan SCSI devices has constantly generated
a certain support load. Not extremely but still astonishing.
As a consequence, we have created a number of patches to our 2.4 kernels
that did improve some things, such as the backport of the REPORT_LUNS
scanning from 2.6 and a number of boot/module parameters that allowed
users to influence how the scanning is done.
http://www.suse.de/~garloff/Linux/scsi-scan/scsi-scanning.html

With kernel 2.6, the REPORT_LUNS is standard for SCSI-3 devices,
but still many arrays exist that report as SCSI-2 and will require
BLIST_SPARSELUN|BLIST_LARGELUN.

An alternative to the blacklist is to offer boot/module parameters
again. This is what the following series of 6 patches do.
Most don't really depend on each other, but they'll only apply
cleanly in the order sent.

I did not yet compare our 2.4 blacklist with the 2.6 one; I'll
port our additional 2.4 entries to 2.6 soon.

Regards,
-- 
Kurt Garloff  <garloff@suse.de>                            Cologne, DE 
SUSE LINUX AG, Nuernberg, DE                          SUSE Labs (Head)

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 42+ messages in thread
* Re: Patches for SCSI scanning
@ 2004-04-22  4:09 Martin Peschke3
  0 siblings, 0 replies; 42+ messages in thread
From: Martin Peschke3 @ 2004-04-22  4:09 UTC (permalink / raw)
  To: Kurt Garloff; +Cc: James Bottomley, Linux SCSI list, Andrew Morton





> On Tue, Apr 20, 2004 at 11:08:49AM -0500, James Bottomley wrote:
> > This looks like it needs fixing in our lun mapping support, doesn't it,
> > rather than trying to work around it with a flag?
>
> Any ideas?
> We need to use full 8byte LUNs then.
> * We can use them as opaque handles. Clean, but resulting in crazy
numbers
>   which sysadmins will hate us for.
> * Reorder the bytes as currently done, but for all 8 of them. Less clean
>   conceptually, but resulting in low LUNs and not changing the behaviour
>   for already supported devices.
>
> I'm in favour of the second solution.

Yes, full-size LUNs as opaque handles is the right way.

Just have the mid-layer store the 64 bit value that the device
reports on REPORT_LUNS. Then, transports that do not allow us to simply
copy a given 64 bit value into some sufficiently sized field
used to address LUNs pick whichever bits of a 64 bit LUN
they are interested in. SCSI documents must have made provision for this
sort of "compression", which makes perfectly sense for _these_ transports.

But there is no reason to punish other transports by mutilating their
LUNs and by forcing them to make guesses about what was cut away. To all
performance fetishists: What an avoidable effort it is to recover a 64
bit LUN from a compressed 32 bit value by shifting and swapping and padding
bits and bytes for each SCSI command to be issued!

Let's retain the full-size LUN by default and allow transports to
to derive a reduced variant, if appropriate. I am all for tranport specific
helper
functions doing that, instead of requiring each parallel SCSI driver
providing its
own (potentially buggy) routine. This should be done once, if applicable,
i.e. when the midlayer has spotted a new LUN. A smaller LUN might be
derived
either by calling into the lldd for that purpose, or by having the midlayer
call some transport specific helper function directly - controlled by some
scsi_host_template flag. There might be even more elegant ways. You name
it.

As to sysfs and friends, we can then choose to either always pick the
fullsize
64 bit LUN, or the <=64 bit LUN appropriate for a particular transport /
lldd.
I would not object to the latter.

Actually, we concluded that 64 bit LUNs are the way to go earlier on
linux-scsi
(http://marc.theaimsgroup.com/?l=linux-scsi&m=104258317622498&w=2)
And there was some guy who was about to volunteer for that task,
but did not come around to it, but tied up by 2.4 maintenance, alas.

However, want a patch? :)

Cheers,
Martin


Kurt Garloff <garloff@suse.de>@vger.kernel.org on 21.04.2004 15:48:46

Sent by:    linux-scsi-owner@vger.kernel.org


To:    James Bottomley <James.Bottomley@steeleye.com>
cc:    Linux SCSI list <linux-scsi@vger.kernel.org>, Andrew Morton
       <akpm@osdl.org>
Subject:    Re: Patches for SCSI scanning



On Tue, Apr 20, 2004 at 11:08:49AM -0500, James Bottomley wrote:
> This looks like it needs fixing in our lun mapping support, doesn't it,
> rather than trying to work around it with a flag?

Any ideas?
We need to use full 8byte LUNs then.
* We can use them as opaque handles. Clean, but resulting in crazy numbers
  which sysadmins will hate us for.
* Reorder the bytes as currently done, but for all 8 of them. Less clean
  conceptually, but resulting in low LUNs and not changing the behaviour
  for already supported devices.

I'm in favour of the second solution.
Want a patch?

Regards,
--
Kurt Garloff  <garloff@suse.de>                            Cologne, DE
SUSE LINUX AG, Nuernberg, DE                          SUSE Labs (Head)




^ permalink raw reply	[flat|nested] 42+ messages in thread
* Re: Patches for SCSI scanning
@ 2004-04-22  4:17 Martin Peschke3
  0 siblings, 0 replies; 42+ messages in thread
From: Martin Peschke3 @ 2004-04-22  4:17 UTC (permalink / raw)
  To: James Bottomley; +Cc: Kurt Garloff, Andrew Morton, Linux SCSI list





> On Tue, 2004-04-20 at 11:03, Kurt Garloff wrote:
> > Linux maps 8 byte LUNs to a 32bit number in scsilun_to_int().
> > There are several ways to use the 8 bytes, but the mapping assumes
> > a particular model which is often used and the mapping is nice in
> > that it results in LUNs being 0, 1, 2, ...
> > However, there are other possibilities. And as soon as the last
> > four bytes are non-zero, the mapping will break down :-/
> > The S/390 folks seem to have such devices.
>
> This looks like it needs fixing in our lun mapping support, doesn't it,
> rather than trying to work around it with a flag?

Yes. I first thought too few people would interested in it for 2.6.
But this sounds encouraging. Let's fix it.

Cheers,
Martin


^ permalink raw reply	[flat|nested] 42+ messages in thread

end of thread, other threads:[~2004-04-22 20:46 UTC | newest]

Thread overview: 42+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-04-18 18:57 Patches for SCSI scanning Kurt Garloff
2004-04-18 23:16 ` James Bottomley
2004-04-20 11:54   ` Kurt Garloff
2004-04-20 12:04     ` Christoph Hellwig
2004-04-20 13:02       ` Kurt Garloff
2004-04-20 14:38     ` James Bottomley
2004-04-20 16:03       ` Kurt Garloff
2004-04-20 16:08         ` James Bottomley
2004-04-21 13:48           ` Kurt Garloff
2004-04-21 15:36             ` James Bottomley
2004-04-21 13:45         ` Kurt Garloff
2004-04-21 14:10           ` PATCH 1/5: scsi-scan-deprecate-forcelun Kurt Garloff
2004-04-21 14:12           ` PATCH 2/5: scsi-scan-blist_replun Kurt Garloff
2004-04-21 15:14             ` Christoph Hellwig
2004-04-21 15:30               ` Kurt Garloff
2004-04-21 16:03               ` Kurt Garloff
2004-04-21 14:13           ` PATCH 3/5: scsi-scan-no-offl-pq-notcon Kurt Garloff
2004-04-21 14:14           ` PATCH 4/5: scsi-scan-dont-att-pq-notcon Kurt Garloff
2004-04-21 15:02             ` Christoph Hellwig
2004-04-21 15:24               ` Kurt Garloff
2004-04-21 15:33                 ` Mike Anderson
2004-04-21 15:33                 ` Christoph Hellwig
2004-04-21 16:08                   ` Kurt Garloff
2004-04-21 16:18                     ` James Bottomley
2004-04-21 16:55                       ` Patrick Mansfield
2004-04-21 22:51                         ` Kurt Garloff
2004-04-22 20:39                           ` Patrick Mansfield
2004-04-22 20:45                             ` James Bottomley
2004-04-21 16:58                       ` Kurt Garloff
2004-04-21 16:16                   ` Kurt Garloff
2004-04-21 15:40             ` James Bottomley
2004-04-21 14:14           ` PATCH 5/5: scsi-scan-inq-timeout Kurt Garloff
2004-04-21 20:24             ` Patrick Mansfield
2004-04-21 22:48               ` Kurt Garloff
2004-04-21 23:49                 ` Patrick Mansfield
2004-04-20 16:26       ` Patches for SCSI scanning Patrick Mansfield
2004-04-20 16:42         ` Kurt Garloff
2004-04-20 17:44           ` Patrick Mansfield
2004-04-21 13:52             ` Kurt Garloff
2004-04-20 10:24 ` Fabien Salvi
  -- strict thread matches above, loose matches on Subject: below --
2004-04-22  4:09 Martin Peschke3
2004-04-22  4:17 Martin Peschke3

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox