Re: [PATCH v3 26/48] scsi: iscsi: Stop using the SCSI pointer

Hannes Reinecke
2022-02-14T10:27:46Z

On 2/11/22 23:32, 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:
> - The qla4xxx driver uses this member to store a struct srb pointer.
> - libiscsi uses this member to store a struct iscsi_task pointer.
>
> Cc: Lee Duncan <lduncan@suse.com>
> Cc: Chris Leech <cleech@redhat.com>
> Cc: Sagi Grimberg <sagi@grimberg.me>
> Cc: Hannes Reinecke <hare@suse.de>
> Cc: Himanshu Madhani <himanshu.madhani@oracle.com>
> Cc: Nilesh Javali <njavali@marvell.com>
> Cc: Manish Rangankar <mrangankar@marvell.com>
> Cc: Karen Xie <kxie@chelsio.com>
> Cc: Ketan Mukadam <ketan.mukadam@broadcom.com>
> Signed-off-by: Bart Van Assche <bvanassche@acm.org>
>
> ---
> drivers/infiniband/ulp/iser/iscsi_iser.c | 1 +
> drivers/scsi/be2iscsi/be_main.c | 3 ++-
> drivers/scsi/bnx2i/bnx2i_iscsi.c | 1 +
> drivers/scsi/cxgbi/cxgb3i/cxgb3i.c | 1 +
> drivers/scsi/cxgbi/cxgb4i/cxgb4i.c | 1 +
> drivers/scsi/iscsi_tcp.c | 1 +
> drivers/scsi/libiscsi.c | 20 ++++++++++----------
> drivers/scsi/qedi/qedi_fw.c | 4 ++--
> drivers/scsi/qedi/qedi_iscsi.c | 1 +
> drivers/scsi/qla4xxx/ql4_def.h | 16 +++++++++++++---
> drivers/scsi/qla4xxx/ql4_os.c | 13 +++++++------
> include/scsi/libiscsi.h | 12 ++++++++++++
> 12 files changed, 52 insertions(+), 22 deletions(-)
>
Reviewed-by: Hannes Reinecke <hare@suse.de>

Cheers,

Hannes
--
Dr. Hannes Reinecke Kernel Storage Architect
hare@suse.de +49 911 74053 688
SUSE Software Solutions Germany GmbH, Maxfeldstr. 5, 90409 Nürnberg
HRB 36809 (AG Nürnberg), GF: Felix Imendörffer