Re: [PATCH v2 15/18] sg: add 8 byte SCSI LUN to sg_scsi_id

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 7/27/19 5:37 AM, Douglas Gilbert wrote:
> The existing ioctl(SG_GET_SCSI_ID) fills a object of type
> struct sg_scsi_id whose last field is int unused[2]. Add
> an anonymous union with u8 scsi_lun[8] sharing those last
> 8 bytes. This patch will place the current device's full
> LUN in the scsi_lun array using T10's preferred LUN
> format (i.e. an array of 8 bytes) when
> ioctl(SG_GET_SCSI_ID) is called.
> 
> Note that structure already contains a 'lun' field but that
> is a 32 bit integer. Users of this upgrade should choose
> the scsi_lun array field henceforth but existing code
> can remain as it is and will get the same 'lun' value with
> the version 3 or version 4 driver.
> 
> Signed-off-by: Douglas Gilbert <dgilbert@xxxxxxxxxxxx>
> ---
>  drivers/scsi/sg.c      | 5 +++--
>  include/uapi/scsi/sg.h | 5 ++++-
>  2 files changed, 7 insertions(+), 3 deletions(-)
> 
Reviewed-by: Hannes Reinecke <hare@xxxxxxxx>

Cheers,

Hannes
-- 
Dr. Hannes Reinecke		   Teamlead Storage & Networking
hare@xxxxxxx			               +49 911 74053 688
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: Felix Imendörffer, Mary Higgins, Sri Rasiah
HRB 21284 (AG Nürnberg)



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux