tcm_loop: Add multi-fabric Linux/SCSI LLD fabric module
Subsystems (2)
PATCH 1/1 tcm_loop: Add multi-fabric Linux/SCSI LLD fabric module
From: Nicholas Bellinger <[email protected]>
Hi James, Christoph and Co,
This patch merges tcm_loop source into a single tcm_loop.c source and header file, and renames drivers/target/tcm_loop/ -> drivers/target/loopback/ to follow the /sys/kernel/config/target/$FABRIC_MOD naming convention for loopback discussed previously on the list.
Please review and merge for .39.
Best Regards,
--nab
-----------------------------------------------------------------------------------
This patch adds the TCM_Loop Linux/SCSI LLD fabric module for accessing TCM device backstores as locally accessable SCSI LUNs in virtual SAS, FC, and iSCSI Target ports using the generic fabric TransportID and Target Port WWN naming handlers from TCM's target_core_fabric_lib.c The TCM_Loop module uses the generic fabric configfs infratructure provided by target_core_fabric_configfs.c and adds a module dependent attribute for the creation/release of the virtual I_T Nexus connected the TCM_Loop Target and Initiator Ports.
TCM_Loop can also be used with the scsi-generic driver so that STGT userspace fabric modules, QEMU-KVM and other hypervisor SCSI passthrough support can access TCM device backstore and control CDB emulation.
For more information please see:
http://linux-iscsi.org/wiki/Tcm_loop
This patch has been updated with changes from Christoph's feedback.
--- drivers/target/Kconfig | 2 + drivers/target/Makefile | 3 + drivers/target/loopback/Kconfig | 11 + drivers/target/loopback/Makefile | 1 + drivers/target/loopback/tcm_loop.c | 1597 ++++++++++++++++++++++++++++++++++++ drivers/target/loopback/tcm_loop.h | 141 ++++ 6 files changed, 1755 insertions(+), 0 deletions(-) create mode 100644 drivers/target/loopback/Kconfig create mode 100644 drivers/target/loopback/Makefile create mode 100644 drivers/target/loopback/tcm_loop.c create mode 100644 drivers/target/loopback/tcm_loop.h
drivers/target/Kconfig +2 -0
@@ -29,4 +29,6 @@ config TCM_PSCSI Say Y here to enable the TCM/pSCSI subsystem plugin for non-buffered passthrough access to Linux/SCSI device +source "drivers/target/loopback/Kconfig" + endif
drivers/target/Makefile +3 -0
@@ -21,3 +21,6 @@ obj-$(CONFIG_TARGET_CORE) += target_core_mod.o obj-$(CONFIG_TCM_IBLOCK) += target_core_iblock.o obj-$(CONFIG_TCM_FILEIO) += target_core_file.o obj-$(CONFIG_TCM_PSCSI) += target_core_pscsi.o + +# Fabric modules +obj-$(CONFIG_LOOPBACK_TARGET) += loopback/
drivers/target/loopback/Kconfig new file +11 -0
@@ -0,0 +1,11 @@ +config LOOPBACK_TARGET + tristate "TCM Virtual SAS target and Linux/SCSI LDD fabric loopback module" + help + Say Y here to enable the TCM Virtual SAS target and Linux/SCSI LLD + fabric loopback module. + +config LOOPBACK_TARGET_CDB_DEBUG + bool "TCM loopback fabric module CDB debug code" + depends on LOOPBACK_TARGET + help + Say Y here to enable the TCM loopback fabric module CDB debug code
drivers/target/loopback/Makefile new file +1 -0
@@ -0,0 +1 @@ +obj-$(CONFIG_LOOPBACK_TARGET) += tcm_loop.o
drivers/target/loopback/tcm_loop.c new file +1597 -0
1,597 lines not on this page · raw message
drivers/target/loopback/tcm_loop.h new file +141 -0
141 lines not on this page · raw message
Signature · 6 lines
1.7.4.1 -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Now that everything is in one C file all functions can be marked static, and there is no need to have prototypes in the header file.
Quoted 3 lines · Christoph Hellwig
Now that everything is in one C file all functions can be marked static, and there is no need to have prototypes in the header file.
Ugh sorry, this had skipped my mind before posting yesterday, and has since been fixed up in lio-4.1. I will send out a updated PATCH-v2 shortly.
Thanks,
--nab