Re: [PATCH 2/2] ib_srp: 64bit LUN fixes

Hannes Reinecke
2014-07-04T14:12:58Z

On 07/04/2014 03:48 PM, Christoph Hellwig wrote:
> On Fri, Jul 04, 2014 at 03:01:40PM +0200, Hannes Reinecke wrote:
>> What I would like to do is to provide accessor functions for the scsi lun;
>> I've started this already for the older SCSI parallel drivers (see my
>> earlier patch).
>> Once everything is moved over to accessors it should be trivial to move from
>> the current scsilun_to_int representation in struct scsi_device to the
>> 'real' LUN.
>>
>> Adding another field would be bit of an overkill IMO, seeing that we can
>> achieve the very same thing with a bit of code reshuffling.
>>
>> James, Christoph, what's your opinion on using accessors?
>> Would solve this issue nicely, and we can also use proper functions for HBAs
>> only capable of handling 32bit LUNs.
>> Drawback is that we would need accessors also for this capable of handling
>> full 64bit LUNs, thus potentially incur some overhead there.
>
> I think storing the struct scsi_lun in the scsi_device is the right way
> to go ahead. Any "accessors" for 8 or 32-bit LUNs should be simply
> enough by just ignoring bits in the array, so there's very little
> performance overhead.
>
> If we can get rid of the old scalar LUN field that would be great,
> and given that we know the printk format fallout already it doesn't look
> like too much work. Do you want to look into this?
>
Already working on it.

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