linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
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,
	joel.becker@oracle.com,
	Linux-fsdevel <linux-fsdevel@vger.kernel.org>
Subject: Re: [RFC v2 05/21] tcm: Add ConfigFS subsystem backstore infrastructure
Date: Wed, 06 Oct 2010 00:51:27 -0700	[thread overview]
Message-ID: <1286351487.5685.145.camel@haakon2.linux-iscsi.org> (raw)
In-Reply-To: <20101006163859Y.fujita.tomonori@lab.ntt.co.jp>

On Wed, 2010-10-06 at 16:43 +0900, FUJITA Tomonori wrote:
> On Wed, 06 Oct 2010 00:22:10 -0700
> "Nicholas A. Bellinger" <nab@linux-iscsi.org> wrote:
> 
> > > > 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..?
> > > 
> > > Doesn't sound so.
> > > 
> > > I want the driver to create necessary target directories in
> > > /sys/kernel/config/target/ibmvscsit/ automatically.
> > > 
> > > 
> > 
> > Hmmmm, well configfs is entirely driven by userspace syscalls, so we
> 
> I think that we really want to configure things by kernel space too
> because the scsi target stuff need to handle hardware.
> 
> Need to load the module and create the module name directory by name?
> 
> Need to read the content in sysfs to get the hardware info and create
> the directories appropriate for the hardware by hand?
> 
> Looks strange and inconvenient interface to me. Why can't the kernel
> just create the directory layout that suits to the hardware for users?
> 
> 

Actually, I already had some code that could simulate mkdir(2) and
rmdir(2) to do exactly what you are talking about here for doing
configfs groups ops from kernel space in 2008 in to assist with the
IOCTL -> configfs v3.0 conversion work.  Joel gave this a big NACK back
then, and I removed the code from target_core_configfs.c shortly
thereafter.  

But really, pushing this logic into userspace and making
python/perl/shell code do these type of things IMHO makes the kernel
level target code cleaner.

Of course I think having something to create configfs groups from
kernelspace is very useful for debugging and ProcFS/SysFS/NetLink/IOCTL
-> ConfigFS conversion purposes, but I will have to defer to Joel for
his reasons of not allowing configfs consumers to do this. (CC'ing
linux-fsdevel)

--nab


           reply	other threads:[~2010-10-06  7:51 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <20101006163859Y.fujita.tomonori@lab.ntt.co.jp>]

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=1286351487.5685.145.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=joel.becker@oracle.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --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;
as well as URLs for NNTP newsgroup(s).