On Wed, 2013-02-13 at 13:52 -0600, Jeremy Linton wrote:
> On 2/13/2013 9:06 AM, Hannes Reinecke wrote:
> > So add a new flag 'support_64bit_luns' to the scsi host and modify report
> > lun scan to not check for max_luns during scanning if that flag is set.
> > This will get rid of the
> 
>       Along these lines, I don't think the scsilun_to_int() and 
> int_to_scsilun()
> routines are correct for > 2^14  luns. SAM  4.6 defines bits 6,7 of byte zero
> in the LU representation format as the address method. Which when set to 00b
> limits it to 256 luns but the overflow into the bus ID probably works for some
> devices.
> 
>       Those routines should probably select/detect an alternative address 
> method
> for luns > 256.
> 
>       Or am I missing something?

Yes.  The two functions are simple transforms ensuring that we can pack
up to two levels of luns into a u32 whatever address method is used.  At
the time it was done, no array or other extant system went beyond this.

At the end of the day, a LUN is just a handle, so even if we go to 64
bits we're still going to be packing the address method into the logical
unit "number".

James


James

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to