OSDN Git Service

scsi: target: core: Add common tpg/enable attribute
authorDmitry Bogdanov <d.bogdanov@yadro.com>
Fri, 10 Sep 2021 08:41:27 +0000 (11:41 +0300)
committerMartin K. Petersen <martin.petersen@oracle.com>
Tue, 5 Oct 2021 03:27:38 +0000 (23:27 -0400)
commit80ed33c8ba932480be99f73dc3f29e1f7da1582c
tree59a501745fe4a301e1bdd143783317b52cc5fa73
parentcdf7f6a10d48589a819a98f0e3dd262079a38120
scsi: target: core: Add common tpg/enable attribute

Many fabric modules provide their own implementation of enable attribute in
tpg.

Provide a way to remove code duplication in the fabric modules and
automatically add "enable" attribute if a fabric module has an
implementation of fabric_enable_tpg().

Link: https://lore.kernel.org/r/20210910084133.17956-2-d.bogdanov@yadro.com
Reviewed-by: Roman Bolshakov <r.bolshakov@yadro.com>
Reviewed-by: Mike Christie <michael.christie@oracle.com>
Signed-off-by: Dmitry Bogdanov <d.bogdanov@yadro.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/target/target_core_configfs.c
drivers/target/target_core_fabric_configfs.c
include/target/target_core_base.h
include/target/target_core_fabric.h