* [PATCH] [Target_Core_Mod/ConfigFS]: Added CONFIGFS_SYSFS_SYMLINKS support
@ 2008-10-17 7:02 Nicholas A. Bellinger
0 siblings, 0 replies; only message in thread
From: Nicholas A. Bellinger @ 2008-10-17 7:02 UTC (permalink / raw)
To: Joel Becker, Greg KH
Cc: Linux-iSCSI.org Target Dev, LKML, linux-scsi, Linux-fsdevel,
SCST-Devel, Alan Stern, Christoph Hellwig, James Bottomley,
Jens Axboe, Andrew Morton
[-- Attachment #1: Type: text/plain, Size: 1836 bytes --]
Added allow_link_kobject() and drop_link_kobject() calls to
/sys/kernel/config/target/core/$HBA_$ID/$STORAGE_OBJECT
Then means the following code now works for accessing struct block_device
and struct scsi_device through Linux/BLOCK and Linux/SCSI subsystems
respectively.
export TARGET=/sys/kernel/config/target/core/
export FABRIC=/sys/kernel/config/target/iscsi/
mkdir -p $TARGET/iblock_0/lvm_test0
ln -s /sys/block/dm-2 $TARGET/iblock_0/lvm_test0/dm-2
mkdir -p $TARGET/pscsi_0/sdd
ln -s /sys/block/sdd/device $TARGET/pscsi_0/sdd/passthrough
export DEF_IQN="iqn.2003-01.org.linux-iscsi.target.i686:sn.e475ed6fcdd0"
<SNIP..>
mkdir -p "$FABRIC/$DEF_IQN/tpgt_1/lun/lun_0"
ln -s $TARGET/iblock_0/lvm_test0 "$FABRIC/$DEF_IQN/tpgt_1/lun/lun_0/lio_west_port"
mkdir -p "$FABRIC/$DEF_IQN/tpgt_1/lun/lun_1"
ln -s $TARGET/pscsi_0/sdd "$FABRIC/$DEF_IQN/tpgt_1/lun/lun_1/lio_east_port"
Signed-off-by: Nicholas A. Bellinger
---
drivers/lio-core/MCONFIG_TARGET | 1 +
drivers/lio-core/Makefile | 3 +
drivers/lio-core/target_core_configfs.c | 95 +++++++++++++++++++++++++++++-
drivers/lio-core/target_core_iblock.c | 18 ++++++
drivers/lio-core/target_core_iblock.h | 2 +
drivers/lio-core/target_core_plugin.c | 2 +-
drivers/lio-core/target_core_pscsi.c | 20 ++++++
drivers/lio-core/target_core_pscsi.h | 2 +
drivers/lio-core/target_core_transport.h | 4 +
9 files changed, 145 insertions(+), 2 deletions(-)
The commit can be found at:
http://git.kernel.org/?p=linux/kernel/git/nab/lio-core-2.6.git;a=commit;h=7549c55a99139de114852f0e0b356f7ec0739b35
The commit that enables kobject symlinks in configfs can be found at:
http://git.kernel.org/?p=linux/kernel/git/nab/lio-core-2.6.git;a=commit;h=317aefe74354c0140dc8aebff1ef9467b6f0c9ba
Comments Folks..?
--nab
[-- Attachment #2: 0002-Target_Core_Mod-ConfigFS-Added-CONFIGFS_SYSFS_SYM.patch --]
[-- Type: application/mbox, Size: 12011 bytes --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2008-10-17 7:02 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-10-17 7:02 [PATCH] [Target_Core_Mod/ConfigFS]: Added CONFIGFS_SYSFS_SYMLINKS support Nicholas A. Bellinger
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).