mbox series

[v5,0/7] target: make tpg/enable attribute

Message ID 20210910084133.17956-1-d.bogdanov@yadro.com (mailing list archive)
Headers show
Series target: make tpg/enable attribute | expand

Message

Dmitry Bogdanov Sept. 10, 2021, 8:41 a.m. UTC
Many fabric modules provide their own implementation of enable
attribute in tpg.
The change set removes the code duplication and automatically adds
"enable" attribute for fabric modules that has an implementation of
fabric_enable_tpg() ops.

This patchset is intended for scsi-queue.

v5:
 rebase on 5.15/scsi-queue
v4:
 fix compilation error and warning
v3:
 refactor tfc_tpg_base_attrs creation
 avoid alloc of attrs if there are no attributes
 fix newlines
 move enable attribute to target_core_fabric_configfs.c
v2:
 create enable atribute only for modules with enable_tpg ops
 add patches for srpt, usb and ibmvscsi

Dmitry Bogdanov (7):
  target: core: add common tpg/enable attribute
  target: iscsi: replace enable attr to ops.enable
  target: qla2xx: replace enable attr to ops.enable
  target: sbp: replace enable attr to ops.enable
  target: srpt replace enable attr to ops.enable
  target: ibm_vscsi: replace enable attr to ops.enable
  target: usb: replace enable attr to ops.enable

 drivers/infiniband/ulp/srpt/ib_srpt.c        | 38 +-------
 drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c     | 42 +--------
 drivers/scsi/qla2xxx/tcm_qla2xxx.c           | 73 +++-------------
 drivers/target/iscsi/iscsi_target_configfs.c | 91 +++++++-------------
 drivers/target/sbp/sbp_target.c              | 30 ++-----
 drivers/target/target_core_configfs.c        |  1 +
 drivers/target/target_core_fabric_configfs.c | 78 ++++++++++++++++-
 drivers/usb/gadget/function/f_tcm.c          | 31 ++-----
 include/target/target_core_base.h            |  1 +
 include/target/target_core_fabric.h          |  1 +
 10 files changed, 142 insertions(+), 244 deletions(-)

Comments

Mike Christie Sept. 30, 2021, 8:46 p.m. UTC | #1
On 9/10/21 3:41 AM, Dmitry Bogdanov wrote:
> Many fabric modules provide their own implementation of enable
> attribute in tpg.
> The change set removes the code duplication and automatically adds
> "enable" attribute for fabric modules that has an implementation of
> fabric_enable_tpg() ops.
> 
> This patchset is intended for scsi-queue.
> 

Reviewed-by: Mike Christie <michael.christie@oracle.com>
Martin K. Petersen Oct. 5, 2021, 3:28 a.m. UTC | #2
>> Many fabric modules provide their own implementation of enable
>> attribute in tpg.  The change set removes the code duplication and
>> automatically adds "enable" attribute for fabric modules that has an
>> implementation of fabric_enable_tpg() ops.

Applied to 5.16/scsi-staging, thanks!
Martin K. Petersen Oct. 12, 2021, 8:35 p.m. UTC | #3
On Fri, 10 Sep 2021 11:41:26 +0300, Dmitry Bogdanov wrote:

> Many fabric modules provide their own implementation of enable
> attribute in tpg.
> The change set removes the code duplication and automatically adds
> "enable" attribute for fabric modules that has an implementation of
> fabric_enable_tpg() ops.
> 
> This patchset is intended for scsi-queue.
> 
> [...]

Applied to 5.16/scsi-queue, thanks!

[1/7] target: core: add common tpg/enable attribute
      https://git.kernel.org/mkp/scsi/c/80ed33c8ba93
[2/7] target: iscsi: replace enable attr to ops.enable
      https://git.kernel.org/mkp/scsi/c/382731ec01b3
[3/7] target: qla2xx: replace enable attr to ops.enable
      https://git.kernel.org/mkp/scsi/c/cb8717a720a9
[4/7] target: sbp: replace enable attr to ops.enable
      https://git.kernel.org/mkp/scsi/c/fb00af92e5db
[5/7] target: srpt replace enable attr to ops.enable
      https://git.kernel.org/mkp/scsi/c/9465b4871af0
[6/7] target: ibm_vscsi: replace enable attr to ops.enable
      https://git.kernel.org/mkp/scsi/c/d7e2932bba1b
[7/7] target: usb: replace enable attr to ops.enable
      https://git.kernel.org/mkp/scsi/c/5384ee089d1f