On 09/12/05 13:21, James Bottomley wrote: >>So some storage devices that want to use addressing methods other than 00b >>don't because we do not have 8 byte LUN support in linux, and then we have >>other problems because of this. > > Well, as long as we represent the u32 (or u64) as > > scsilun[1] | (scsilun[0] << 8) | (scsilun[3] << 16) | (scsilun[2] << 24) > > I think we cover all 2 level lun bases, don't we (obviously we ignore > levels 3 and 4 [and 6 and 8 byte extended luns])? I fail to see why do you want to interpret LUNs? If you want to be "future-proof", SCSI Core should use it transparently, a la, memcpy(). If you want to print it you can use "%016llx", be64_to_cpu(*(u64 *)...), just like WWN. _That_ will have a meaning to the application client/user, but SCSI Core should treat it as a transparent token. > That representation works transparently for type 00b which is what SPI > and other legacy expects, since our lun variable is equal to the actual > numeric lun. Although SAM allows type 01b for arrays with < 256 LUNs it > does strongly suggest you use type 00b which hopefully will cover us for > a while longer... Why do you care about any of this if you support 64 bit luns? Luben > fc already uses int_to_scsilun and 8 byte LUN addressing, so it will > work even in the 01b case (the numbers that the mid-layer prints will > look odd, but at least the driver will work). - : send the line "unsubscribe linux-scsi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html