linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Nicholas A. Bellinger" <nab@linux-iscsi.org>
To: Joel Becker <joel.becker@oracle.com>, Greg KH <greg@kroah.com>
Cc: "Linux-iSCSI.org Target Dev"
	<linux-iscsi-target-dev@googlegroups.com>,
	LKML <linux-kernel@vger.kernel.org>,
	linux-scsi <linux-scsi@vger.kernel.org>,
	Linux-fsdevel <linux-fsdevel@vger.kernel.org>,
	SCST-Devel <scst-devel@lists.sourceforge.net>,
	Alan Stern <stern@rowland.harvard.edu>,
	Christoph Hellwig <hch@infradead.org>,
	James Bottomley <James.Bottomley@HansenPartnership.com>,
	Jens Axboe <jens.axboe@oracle.com>, Andrew Morton <akpm@osdl.org>
Subject: [PATCH] [Target_Core_Mod/ConfigFS]: Added CONFIGFS_SYSFS_SYMLINKS support
Date: Fri, 17 Oct 2008 00:02:37 -0700	[thread overview]
Message-ID: <1224226957.5556.287.camel@haakon2.linux-iscsi.org> (raw)

[-- 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 --]

                 reply	other threads:[~2008-10-17  7:02 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1224226957.5556.287.camel@haakon2.linux-iscsi.org \
    --to=nab@linux-iscsi.org \
    --cc=James.Bottomley@HansenPartnership.com \
    --cc=akpm@osdl.org \
    --cc=greg@kroah.com \
    --cc=hch@infradead.org \
    --cc=jens.axboe@oracle.com \
    --cc=joel.becker@oracle.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-iscsi-target-dev@googlegroups.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=scst-devel@lists.sourceforge.net \
    --cc=stern@rowland.harvard.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).