Re: [PATCH v2 22/44] iscsi: Stop using the SCSI pointer

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

 



On 2/9/22 1:24 PM, Mike Christie wrote:
> On 2/8/22 11:24 AM, Bart Van Assche wrote:
>> Instead of storing the iSCSI task pointer and the session age in the SCSI
>> pointer, use command-private variables. This patch prepares for removal of
>> the SCSI pointer from struct scsi_cmnd.
>>
>> The list of iSCSI drivers has been obtained as follows:
>> $ git grep -lw iscsi_host_alloc
>> drivers/infiniband/ulp/iser/iscsi_iser.c
>> drivers/scsi/be2iscsi/be_main.c
>> drivers/scsi/bnx2i/bnx2i_iscsi.c
>> drivers/scsi/cxgbi/libcxgbi.c
>> drivers/scsi/iscsi_tcp.c
>> drivers/scsi/libiscsi.c
>> drivers/scsi/qedi/qedi_main.c
>> drivers/scsi/qla4xxx/ql4_os.c
>> include/scsi/libiscsi.h
>>
>> Note: it is not clear to me how the qla4xxx driver can work without this
>> patch since it uses the scsi_cmnd::SCp.ptr member for two different
>> purposes:
> 
> qla4xxx doesn't use libiscsi for scsi_cmd based IO. It has it's own
> queuecommand, completion path and error handlers, because it offloads
> the entire scsi cmd operation.
> 
> It only uses libiscsi for iscsi passthrough IO which doesn't use the
> scsi_cmnd.
> 
> 
>>  
>>  static void qedi_conn_free_login_resources(struct qedi_ctx *qedi,
>> diff --git a/drivers/scsi/qla4xxx/ql4_def.h b/drivers/scsi/qla4xxx/ql4_def.h
>> index 69a590546bf9..a122909169ee 100644
>> --- a/drivers/scsi/qla4xxx/ql4_def.h
>> +++ b/drivers/scsi/qla4xxx/ql4_def.h
>> @@ -216,11 +216,18 @@
>>  #define IDC_COMP_TOV			5
>>  #define LINK_UP_COMP_TOV		30
>>  
>> -#define CMD_SP(Cmnd)			((Cmnd)->SCp.ptr)
>> +struct qla4xxx_cmd_priv {
>> +	struct iscsi_cmd iscsi_data; /* must be the first member */
>> +	struct srb *srb;
>> +};
> 
> 
> So you don't need the iscsi_cmd above.

Mike's of course right about qla4xxx, but it still calls iscsi_host_alloc
so only accounting for the srb pointer in cmd_size is going to trigger the 
WARN_ON_ONCE Bart added.

- Chris Leech




[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