lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1224226957.5556.287.camel@haakon2.linux-iscsi.org>
Date:	Fri, 17 Oct 2008 00:02:37 -0700
From:	"Nicholas A. Bellinger" <nab@...ux-iscsi.org>
To:	Joel Becker <joel.becker@...cle.com>, Greg KH <greg@...ah.com>
Cc:	"Linux-iSCSI.org Target Dev" 
	<linux-iscsi-target-dev@...glegroups.com>,
	LKML <linux-kernel@...r.kernel.org>,
	linux-scsi <linux-scsi@...r.kernel.org>,
	Linux-fsdevel <linux-fsdevel@...r.kernel.org>,
	SCST-Devel <scst-devel@...ts.sourceforge.net>,
	Alan Stern <stern@...land.harvard.edu>,
	Christoph Hellwig <hch@...radead.org>,
	James Bottomley <James.Bottomley@...senPartnership.com>,
	Jens Axboe <jens.axboe@...cle.com>,
	Andrew Morton <akpm@...l.org>
Subject: [PATCH] [Target_Core_Mod/ConfigFS]: Added CONFIGFS_SYSFS_SYMLINKS
	support

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


Download attachment "0002-Target_Core_Mod-ConfigFS-Added-CONFIGFS_SYSFS_SYM.patch" of type "application/mbox" (12012 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ