From: "Nicholas A. Bellinger" <nab@linux-iscsi.org>
To: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: Michal Nazarewicz <mina86@mina86.com>,
Andrzej Pietrasiewicz <andrzej.p@samsung.com>,
linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
Kyungmin Park <kyungmin.park@samsung.com>,
Felipe Balbi <balbi@ti.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Joel Becker <jlbec@evilplan.org>,
Marek Szyprowski <m.szyprowski@samsung.com>,
target-devel <target-devel@vger.kernel.org>
Subject: Re: [RFC][PATCH] fs: configfs: programmatically create config groups
Date: Tue, 27 Nov 2012 23:08:16 -0800 [thread overview]
Message-ID: <1354086496.18984.16.camel@haakon2.linux-iscsi.org> (raw)
In-Reply-To: <50B4DA4E.3020900@linutronix.de>
Hi Sebastian & Co,
On Tue, 2012-11-27 at 16:20 +0100, Sebastian Andrzej Siewior wrote:
> On 11/26/2012 06:54 PM, Michal Nazarewicz wrote:
> > On Mon, Nov 26 2012, Sebastian Andrzej Siewior wrote:
> >> Wouldn't say that. It may adds complexity on another level. The target
> >> subsystem has the same problem with adding luns and there seems nothing
> >> wrong with having lun3 and 4 and leaving 0 and 1 unsued.
> >
> > That's not what Wikipedia claims though (from
> > <http://en.wikipedia.org/wiki/Logical_Unit_Number>):
> >
> > LUN 0: There is one LUN which is required to exist in every
> > target: zero. The logical unit with LUN zero is special in that
> > it must implement a few specific commands, most notably Report
> > LUNs, which is how an initiator can find out all the other LUNs
> > in the target. But LUN zero need not provide any other services,
> > such as a storage volume.
> >
> > That's why I proposed solution where one needs to have continuous
> > numbering of LUNs. I'm not an expert on SCSI though.
>
> Let me quote "4.6.4 Minimum LUN addressing requirements" of SAM4:
>
> | All SCSI target devices shall support LUN 0 (i.e., 00000000
> | 00000000h) or the REPORT LUNS well-known logical unit. For SCSI
> | target devices that support the hierarchical addressing model the LUN
> | 0 or the REPORT LUNS well-known logical unit shall be the logical
> | unit that an application client addresses to determine
> | information about the SCSI target device and the logical units
> | contained within the SCSI target device.
>
> Nab, I think not having LUN0 configured as long as REPORT LUNS says
> which luns are available is fine. Target seems to work on linux without
> it and SAM4 does no claim otherwise unless I miss interpret it. Any
> opinion on this from your side?
>
So we use a special RAMDISK-MCP @ target_core_device.c:g_lun0_dev along
with a se_lun (located @ se_portal_group->tpg_virt_lun0) to always
service REPORT_LUNS to LUN=0, regardless of LUN=0 configfs fabric
endpoint layout.
Note this happens within target_core_device.c:transport_lookup_cmd_lun()
once no active se_node_acl->device_list[unpacked_lun] entry can be
located.
> >
> >> With the tcm gadget I get:
> >>
> >> |scsi 0:0:0:2: Direct-Access LIO-ORG RAMDISK-MCP 4.0 PQ: 0
> >> ANSI: 5
> >> |scsi 0:0:0:3: Direct-Access LIO-ORG FILEIO 4.0 PQ: 0
> >> ANSI: 5
> >>
> >> You notice :2 and :3 instead :0 and :1. While should be there something
> >> wrong with this?
> >
> > It may be that it works on Linux but fails on some other systems (or
> > even older Linux kernels). Like I've said, I'm not SCSI expert, so my
> > knowledge of it is (embarrassingly) minimal.
>
> Sure but still. You limit the user to create lunX folders where X can
> be 0..255 for instance. If the user chooses not create lun0, why force
> him?
>
It's certainly easier for the user if REPORT_LUNS always 'just works' to
LUN=0.
--nab
next prev parent reply other threads:[~2012-11-28 7:08 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-26 8:35 Andrzej Pietrasiewicz
2012-11-26 8:35 ` [RFC][PATCH] fs: configfs: allow other kernel parts to " Andrzej Pietrasiewicz
2012-11-26 13:14 ` [RFC][PATCH] fs: configfs: " Michal Nazarewicz
2012-11-26 16:30 ` Sebastian Andrzej Siewior
2012-11-26 16:56 ` Michal Nazarewicz
2012-11-26 17:06 ` Sebastian Andrzej Siewior
2012-11-26 17:54 ` Michal Nazarewicz
2012-11-27 15:20 ` Sebastian Andrzej Siewior
2012-11-28 7:08 ` Nicholas A. Bellinger [this message]
2012-11-27 8:57 ` Andrzej Pietrasiewicz
2012-11-27 14:32 ` Michal Nazarewicz
2012-11-27 15:59 ` Sebastian Andrzej Siewior
2012-11-27 16:23 ` Michal Nazarewicz
2012-11-28 8:15 ` Sebastian Andrzej Siewior
2012-11-28 13:05 ` Michal Nazarewicz
2012-11-28 13:50 ` Sebastian Andrzej Siewior
2012-11-28 14:24 ` Michal Nazarewicz
2012-11-28 18:52 ` Sebastian Andrzej Siewior
2012-12-07 23:18 ` Joel Becker
2012-12-10 11:57 ` Andrzej Pietrasiewicz
2012-12-10 14:17 ` Andrzej Pietrasiewicz
2012-12-10 14:34 ` Felipe Balbi
2012-12-10 15:27 ` Andrzej Pietrasiewicz
2012-12-12 1:10 ` Joel Becker
2012-12-11 21:27 ` Joel Becker
2012-12-14 12:18 ` Sebastian Andrzej Siewior
2012-11-28 8:10 ` Andrzej Pietrasiewicz
2012-11-28 8:38 ` Sebastian Andrzej Siewior
2012-11-28 14:09 ` Andrzej Pietrasiewicz
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=1354086496.18984.16.camel@haakon2.linux-iscsi.org \
--to=nab@linux-iscsi.org \
--cc=andrzej.p@samsung.com \
--cc=balbi@ti.com \
--cc=bigeasy@linutronix.de \
--cc=gregkh@linuxfoundation.org \
--cc=jlbec@evilplan.org \
--cc=kyungmin.park@samsung.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=m.szyprowski@samsung.com \
--cc=mina86@mina86.com \
--cc=target-devel@vger.kernel.org \
/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
all inboxes | Powered by JetHome®