From: Andy Grover <agrover@redhat.com>
To: Hannes Reinecke <hare@suse.de>,
"Nicholas A. Bellinger" <nab@linux-iscsi.org>
Cc: Nic Bellinger <nab@daterainc.com>,
target-devel@vger.kernel.org, linux-scsi@vger.kernel.org
Subject: Re: [PATCH 6/8] target_core_spc: Include target device descriptor in VPD page 83
Date: Wed, 05 Mar 2014 11:41:33 -0800 [thread overview]
Message-ID: <53177DED.8050307@redhat.com> (raw)
In-Reply-To: <52B168F5.9060300@suse.de>
On 12/18/2013 01:20 AM, Hannes Reinecke wrote:
> On 12/17/2013 09:01 PM, Nicholas A. Bellinger wrote:
>> On Tue, 2013-12-17 at 11:50 -0800, Nicholas A. Bellinger wrote:
>>> On Tue, 2013-12-17 at 09:18 +0100, Hannes Reinecke wrote:
>>>> We should be including a descriptor referring to the target device
>>>> to allow identification of different TCM instances.
>>>>
>>>> Signed-off-by: Hannes Reinecke <hare@suse.de>
>>>> ---
>>>> drivers/target/target_core_spc.c | 43 +++++++++++++++++++++++++++++++++++++++-
>>>> 1 file changed, 42 insertions(+), 1 deletion(-)
>>>>
>>>
>>> One issue with this patch. The local buffer in spc_emulate_inquiry is
>>> currently hardcoded to SE_INQUIRY_BUF=512, so two large scsi name
>>> designators could overflow here..
>>>
>>> So for the largest case with EVPD=0x83, this would be:
>>>
>>> 4 bytes for header +
>>> 20 bytes for NAA IEEE Registered Extended Assigned designator +
>>> 56 bytes for T10 Vendor Identifier +
>>> 8 bytes for Relative target port +
>>> 8 bytes for Target port group +
>>> 8 bytes for Logical unit group +
>>> 256 bytes for SCSI name (target port) +
>>> 256 bytes for SCSI name (target device) == 616 bytes.
>>>
>>> So for good measure, bumping up SE_INQUIRY_BUF to 1024.
>>>
>>
>> Mmmm, looking at this again, is reporting back two SCSI names in
>> EVPD=0x83 with different associations (one for target port, and one for
>> target device) really necessary..?
>>
>> Doesn't the existing target port association report back the same
>> information..?
>>
> No.
> 'Target port' is the identification for the port handling the
> request, which is contained within a target device.
>
> The reason why we need this is that we want to identify the scope of
> the Target port group number.
>
> Target port group numbers are relative to the encompassing target
> device, so when we're having _several_ target devices they might
> well provide us with identical target port group numbers.
>
> For explicit ALUA each target port group within a target device can
> be thought of a 'scheduling domain', ie if I sent STPG to one of the
> devices in that domain there is a _high_ likelihood that _every_
> device within that scheduling domain will be affected.
> So I can be slightly smarter here and just send one STPG and then
> wait for the resulting states on all affected devices.
>
> If I don't have this information I am required to send STPG to each
> and every device, thereby flooding the target controller with STPGs
> for the same target port group.
>
> So yes, we should be furnishing both.
> In addition it's the only sane way of identifying the array :-)
Hi, fbfe858 only bumps INQUIRY_BUF to 768 although the comment says
1024, is this expected and ok?
Regards -- Andy
next prev parent reply other threads:[~2014-03-05 19:41 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-17 8:18 [PATCHv3 0/8] Referrals support Hannes Reinecke
2013-12-17 8:18 ` [PATCH 1/8] target_core_alua: validate ALUA state transition Hannes Reinecke
2013-12-17 19:32 ` Nicholas A. Bellinger
2013-12-17 8:18 ` [PATCH 2/8] target_core_alua: Allocate ALUA metadata on demand Hannes Reinecke
2013-12-17 19:32 ` Nicholas A. Bellinger
2013-12-17 8:18 ` [PATCH 3/8] target_core_alua: store old and pending ALUA state Hannes Reinecke
2013-12-17 19:32 ` Nicholas A. Bellinger
2013-12-17 8:18 ` [PATCH 4/8] target_core_alua: Use workqueue for ALUA transitioning Hannes Reinecke
2013-12-17 19:32 ` Nicholas A. Bellinger
2013-12-17 8:18 ` [PATCH 5/8] target_core: simplify scsi_name_len calculation Hannes Reinecke
2013-12-17 19:32 ` Nicholas A. Bellinger
2013-12-17 8:18 ` [PATCH 6/8] target_core_spc: Include target device descriptor in VPD page 83 Hannes Reinecke
2013-12-17 19:50 ` Nicholas A. Bellinger
2013-12-17 20:01 ` Nicholas A. Bellinger
2013-12-18 9:20 ` Hannes Reinecke
2014-03-05 19:41 ` Andy Grover [this message]
2014-03-05 19:45 ` Andy Grover
2013-12-17 8:18 ` [PATCH 7/8] target_core_alua: Referrals infrastructure Hannes Reinecke
2013-12-17 20:06 ` Nicholas A. Bellinger
2013-12-18 8:09 ` Hannes Reinecke
2013-12-17 8:18 ` [PATCH 8/8] target_core_alua: Referrals configfs integration Hannes Reinecke
2013-12-17 20:49 ` Nicholas A. Bellinger
2013-12-18 8:15 ` Hannes Reinecke
2013-12-19 6:25 ` Nicholas A. Bellinger
2013-12-19 7:04 ` Hannes Reinecke
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=53177DED.8050307@redhat.com \
--to=agrover@redhat.com \
--cc=hare@suse.de \
--cc=linux-scsi@vger.kernel.org \
--cc=nab@daterainc.com \
--cc=nab@linux-iscsi.org \
--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;
as well as URLs for NNTP newsgroup(s).