From: Hannes Reinecke <hare@suse.de>
To: James.Smart@emulex.com
Cc: Tomas Henzl <thenzl@redhat.com>,
Chad Dupuis <chad.dupuis@qlogic.com>,
"linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
James Bottomley <jbottomley@parallels.com>,
Jeremy Linton <jlinton@tributary.com>,
Robert Elliott <Elliott@hp.com>,
Bart Van Assche <bvanassche@acm.org>,
Bud Brown <bubrown@redhat.com>
Subject: Re: [PATCH 0/4] scsi: 64-bit LUN support
Date: Mon, 08 Apr 2013 16:06:41 +0200 [thread overview]
Message-ID: <5162CEF1.8030304@suse.de> (raw)
In-Reply-To: <e585e906-5ada-4fe6-a21d-b735c42a51c1@CMEXHTCAS1.ad.emulex.com>
On 04/05/2013 05:24 PM, James Smart wrote:
>
> On 4/4/2013 6:17 AM, Hannes Reinecke wrote:
>> On 03/31/2013 07:44 PM, Tomas Henzl wrote:
>>> What we can do is to decode the LUN and compare it to max_lun
>>> provided by the driver,
>>> I think that sg_luns is able to do that, so what is needed is
>>> just to follow the SAM.
>>>
>>> I have seen reports of problem on three different drivers
>>> connected to various
>>> external storage, all of them having the same basic reason - the
>>> driver sets a max_lun
>>> and then LUN comes encoded with a newer addressing method and
>>> something like this is shown
>>> 'kernel: scsi: host 2 channel 0 id 2 lun16643 has a LUN larger
>>> than allowed by the host adapter'
>>>
>>> Decoding the real LUN value would fix this problem, by decoding
>>> is only meant the use in
>>> scsi_report_lun_scan. The LUN would be stored exactly the same
>>> way as it is now.
>>> I know we can patch the certain drivers too, but when max_lun
>>> were what the name says
>>> - max LU number, it would fix my problem very easy.
>>>
>> Errm.
>>
>> No. Decoding LUNs is _evil_. It has only a relevance on the target,
>> and even then it might choose to ignore it.
>> So we cannot try to out-guess the target here.
>>
>> The error you're reporting is that lpfc is setting max_luns to
>> '255', which of course is less than 16643. Increasing max_luns on
>> lpfc to '0xFFFF' will fix your problem; nothing to do with 64-bit
>> LUNs ...
>>
>
> The reason lpfc set max_luns to 255 is due to the midlayer using
> max_luns as a (SCSI-2 device) max sequential scan loop top value,
> not necessarily as a max lun # as what's now in the report luns scan
> loop. When we were attached to jbods (loop, etc) - we saw 2
> problems: our scan time dramatically increased (several minutes
> based on a 16k max_lun value); and as the jbod only decoded 8 bits -
> it happened to respond successfully to any lun value where the lower
> 8-bits were 0, meaning lots of midlayer "ghost" devices were created
> when in reality there was only 1 lun present. Changing the
> max_luns value is fine as long as you know what's attached.
>
Well, these are actually _two_ issues; the one is for sequential
scan scaling with max_luns, the other is for a JBOD behaving badly
when addressing LUNs with more than 8 bits set.
Yes, it is true that sequential scan scales linearly with max_luns,
so scanning 16k LUNs _does_ take some time.
We had the same issue when using older EMC Clariion or Symmetrix
which announced themselves as SCSI-2 devices.
This is why we introduced the BLIST_REPORTLUN2 flag ...
However, this will only be an issue if you have 'sparse_lun' set.
The first I would declare a non-issue, as sequential scanning should
stop after the first invalid device.
Unless 'sparse_lun' is set, but this must be set explicitly via
blacklist flags.
And using 'sparse_lun' is _always_ asking for trouble, especially
on a known broken device ...
Do you happen to know which make the JBOD was?
I would rather advocate for adding another BLIST flag here instead
of degrading the entire scsi host ...
Thanks.
Cheers,
Hannes
--
Dr. Hannes Reinecke zSeries & Storage
hare@suse.de +49 911 74053 688
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: J. Hawn, J. Guild, F. Imendörffer, HRB 16746 (AG Nürnberg)
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2013-04-08 14:06 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-19 8:17 [PATCH 0/4] scsi: 64-bit LUN support Hannes Reinecke
2013-02-19 8:18 ` [PATCH 1/4] scsi_scan: Fixup scsilun_to_int() Hannes Reinecke
2013-02-19 8:18 ` [PATCH 2/4] scsi: use 64-bit LUNs Hannes Reinecke
2013-02-25 15:33 ` Steffen Maier
2013-02-25 15:52 ` Hannes Reinecke
2013-02-25 17:08 ` Douglas Gilbert
2013-02-19 8:18 ` [PATCH 3/4] scsi: use 64-bit value for 'max_luns' Hannes Reinecke
2013-02-19 16:30 ` Michael Christie
2013-02-19 16:33 ` James Bottomley
2013-02-20 6:43 ` Hannes Reinecke
2013-02-19 8:18 ` [PATCH 4/4] scsi: Remove CONFIG_SCSI_MULTI_LUN Hannes Reinecke
2013-02-21 16:15 ` [PATCH 0/4] scsi: 64-bit LUN support Elliott, Robert (Server Storage)
2013-02-21 16:32 ` James Bottomley
2013-02-25 16:02 ` Douglas Gilbert
2013-02-23 9:31 ` Hannes Reinecke
2013-03-26 18:00 ` Chad Dupuis
2013-03-26 19:03 ` Douglas Gilbert
2013-03-27 7:37 ` Hannes Reinecke
2013-03-27 11:58 ` Chad Dupuis
2013-03-29 16:32 ` Tomas Henzl
2013-03-30 16:53 ` Hannes Reinecke
2013-03-31 17:44 ` Tomas Henzl
2013-04-04 10:17 ` Hannes Reinecke
2013-04-05 15:24 ` James Smart
2013-04-08 14:06 ` Hannes Reinecke [this message]
2013-04-08 15:37 ` Tomas Henzl
2013-04-09 7:38 ` Hannes Reinecke
2013-04-09 14:27 ` Elliott, Robert (Server Storage)
2013-04-09 14:52 ` Hannes Reinecke
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=5162CEF1.8030304@suse.de \
--to=hare@suse.de \
--cc=Elliott@hp.com \
--cc=James.Smart@emulex.com \
--cc=bubrown@redhat.com \
--cc=bvanassche@acm.org \
--cc=chad.dupuis@qlogic.com \
--cc=jbottomley@parallels.com \
--cc=jlinton@tributary.com \
--cc=linux-scsi@vger.kernel.org \
--cc=thenzl@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.