From: "Nicholas A. Bellinger" <nab@linux-iscsi.org>
To: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Cc: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org,
michaelc@cs.wisc.edu, hch@lst.de, hare@suse.de,
James.Bottomley@suse.de, axboe@kernel.dk, bharrosh@panasas.com
Subject: Re: [RFC v2 05/21] tcm: Add ConfigFS subsystem backstore infrastructure
Date: Tue, 05 Oct 2010 21:30:42 -0700 [thread overview]
Message-ID: <1286339442.5685.76.camel@haakon2.linux-iscsi.org> (raw)
In-Reply-To: <20101006091219Q.fujita.tomonori@lab.ntt.co.jp>
On Wed, 2010-10-06 at 09:17 +0900, FUJITA Tomonori wrote:
> On Wed, 22 Sep 2010 15:49:10 -0700
> "Nicholas A. Bellinger" <nab@linux-iscsi.org> wrote:
>
> > From: Nicholas Bellinger <nab@linux-iscsi.org>
> >
> > This patch adds the TCM/ConfigFS core HBA and device backstore infrastructre
> > objects in /sys/kernel/config/target/core. It includes wrappers to logic for
> > Persistent Reservations and ALUA, and supports Linux/SCSI, Linux/BLOCK, and Linux/FILEIO
> > backstores using TCM subsystem plugin API.
> >
> > Signed-off-by: Nicholas A. Bellinger <nab@linux-iscsi.org>
> > ---
> > drivers/target/target_core_configfs.c | 3334 +++++++++++++++++++++++++++++++++
> > include/target/target_core_configfs.h | 57 +
> > 2 files changed, 3391 insertions(+), 0 deletions(-)
> > create mode 100644 drivers/target/target_core_configfs.c
> > create mode 100644 include/target/target_core_configfs.h
>
> Can a driver create a directory/file under configfs?
>
> ibmvscsi target driver gets the list of targets to set up from
> hardware (see how drivers/scsi/ibmvscsi/ibmvstgt.c use
> vio_register_driver). The driver needs to tell an user about it so
> that he can set up luns, etc via configfs.
Hi Tomo-san,
I have been thinking about something similar that is needed for the WIP
TCM HW target mode drivers when a:
mkdir -p /sys/kernel/config/target/$TCM_MOD/$LPORT_WWPN/tpgt_1
happens the WWPN is coming from HW. This currently looks like something
along the lines of the following for tcm_lpfc:
http://git.kernel.org/?p=linux/kernel/git/nab/lio-core-2.6.git;a=blob;f=drivers/target/tcm_lpfc/tcm_lpfc_configfs.c;hb=tcm_lpfc#l227
The main issue here is that the user still needs to know the $LPORT_WWPN
before hand (either from looking at a sticker on the card, or via
another method) in order to preform the initial TFO->fabric_make_wwn()
-> $TCM_MOD_make_wwn() operation. So what we need is a configfs attrib
at the top level TCM fabric group in order to see a list of the
available hardware ports from the specific $TCM_MOD. What I was
thinking for TCM HW fabric module ports would be to have something like:
/sys/kernel/config/target/$TCM_MOD/hw_ports
that would walk the struct pci_dev looking for fabric module specific HW
target mode capabilities. I assume this is what you had in mind for
drivers/scsi/ibmvscsi as well, yes..?
Anyways, this should be easy enough add a generic top level hw_ports
attrib into target_core_fabric_configfs.c and optionally provide this
logic for HW target mode capable code.
I have a few external items in the next days, but I will make sure to
get this coded and merged into TCM v4.0.0-rc5 and the next RFC-for.37
rebase.
Thanks Tomo!
--nab
next prev parent reply other threads:[~2010-10-06 4:35 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-22 22:49 Nicholas A. Bellinger
2010-10-06 0:17 ` FUJITA Tomonori
2010-10-06 4:30 ` Nicholas A. Bellinger [this message]
2010-10-06 7:09 ` FUJITA Tomonori
2010-10-06 7:22 ` Nicholas A. Bellinger
2010-10-06 7:43 ` FUJITA Tomonori
2010-10-06 7:51 ` Nicholas A. Bellinger
2010-10-06 7:25 ` FUJITA Tomonori
2010-10-06 7:43 ` Nicholas A. Bellinger
2010-10-06 12:13 ` Vladislav Bolkhovitin
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=1286339442.5685.76.camel@haakon2.linux-iscsi.org \
--to=nab@linux-iscsi.org \
--cc=James.Bottomley@suse.de \
--cc=axboe@kernel.dk \
--cc=bharrosh@panasas.com \
--cc=fujita.tomonori@lab.ntt.co.jp \
--cc=hare@suse.de \
--cc=hch@lst.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=michaelc@cs.wisc.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
Powered by JetHome