Re: [PATCH 02/15] target: separate acl name from port ids

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

 



On 5/10/20 11:57 PM, Mike Christie wrote:
The PGR code assumes the ACL name is going to be based on the SPC4
transportID type of values. The problem is that for iSCSI we have an extra
session id as part of the SCSI port id and some fabric modules support or
would like to support non transportID values for the ACL name. For example,
iSCSI and SRP would like to use the source address for the ACL name, but
that is not a valud transportID value that you can get in a PGR request.

This patch adds a new transport_id struct which maps to the SPC4
transportID. In the future it will be used for PGR commands instead of the
ACL name. In this patchset it is used to export the initiator info in the
session's sysfs dir, so tools can display the info and daemons that execute
commands like PGRs in userspace can build a session id to I_T nexus mapping.

In this patch only srp is passing in different values for the transport id
and acl name. The next patches will convert loop, scsi vhost and xen
scsiback that are more complex due to their initiator name emulation.

Cc: Michael S. Tsirkin <mst@xxxxxxxxxx>
Cc: Jason Wang <jasowang@xxxxxxxxxx>
Cc: Paolo Bonzini <pbonzini@xxxxxxxxxx>
Cc: Stefan Hajnoczi <stefanha@xxxxxxxxxx>
Cc: Juergen Gross <jgross@xxxxxxxx>
Signed-off-by: Mike Christie <mchristi@xxxxxxxxxx>
---

V4:
- Don't drop const char use. We still have target_setup_session allocate
the transport_id struct, but because every uses format=0 we just need to
pass in the transport_id's name.

V3:
- drop format

  drivers/infiniband/ulp/srpt/ib_srpt.c    | 10 +++++---
  drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c |  4 +--
  drivers/scsi/qla2xxx/tcm_qla2xxx.c       |  2 +-
  drivers/target/loopback/tcm_loop.c       |  3 ++-
  drivers/target/sbp/sbp_target.c          |  2 +-
  drivers/target/target_core_fabric_lib.c  | 41 +++++++++++++++++++++++++++++++
  drivers/target/target_core_transport.c   | 42 ++++++++++++++++++++++++--------
  drivers/target/tcm_fc/tfc_sess.c         |  3 ++-
  drivers/usb/gadget/function/f_tcm.c      |  3 ++-
  drivers/vhost/scsi.c                     |  1 +
  drivers/xen/xen-scsiback.c               |  3 ++-
  include/target/target_core_base.h        | 12 +++++++++
  include/target/target_core_fabric.h      |  5 +++-
  13 files changed, 108 insertions(+), 23 deletions(-)

Reviewed-by: Hannes Reinecke <hare@xxxxxxx>

Cheers,

Hannes
--
Dr. Hannes Reinecke            Teamlead Storage & Networking
hare@xxxxxxx                               +49 911 74053 688
SUSE Software Solutions GmbH, Maxfeldstr. 5, 90409 Nürnberg
HRB 36809 (AG Nürnberg), Geschäftsführer: Felix Imendörffer



[Index of Archives]     [Linux SCSI]     [Kernel Newbies]     [Linux SCSI Target Infrastructure]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Device Mapper]

  Powered by Linux