From: Patrick Mansfield <patmans@us.ibm.com>
To: James Bottomley <James.Bottomley@steeleye.com>
Cc: Steven Dake <sdake@mvista.com>,
SCSI Mailing List <linux-scsi@vger.kernel.org>
Subject: Re: why store the search type in the ieee name field?
Date: Tue, 11 Feb 2003 08:20:39 -0800 [thread overview]
Message-ID: <20030211082039.A27630@beaverton.ibm.com> (raw)
In-Reply-To: <1044918776.1776.257.camel@mulgrave>; from James.Bottomley@steeleye.com on Mon, Feb 10, 2003 at 05:12:54PM -0600
On Mon, Feb 10, 2003 at 05:12:54PM -0600, James Bottomley wrote:
> On Mon, 2003-02-10 at 16:45, Steven Dake wrote:
> > Folks,
> >
> > I was wondering the reasoning behind the code
> >
> > scsi_scan:734
> > /*
> > * All OK - store ID
> > */
> > name[0] = hex_str[id_search->id_type];
> >
> > This corrupts a perfectly good IEEE unique identifier (WWN for FC
> > drives). Is there some usage for this in user space?
>
> Erm, it's appending the type to the beginning of the name string
> (although it does seem to be relying on the sysfs name field being zero
> filled). I don't see any corruption since the inquiry fields and unique
> name name follows this byte.
It should fill in the rest of the 'name' and append a '\0', or return a
failure.
> You get the identifier it found from the sysfs name file for the
> device. The first byte tells you what type of unique name you're
> dealing with.
>
> James
And the identifiers are not unique across different identifier types, so
it has to store the id_type in order to have unique identifiers (at least
for scsi) across all types: for example, a vendor specific id could be the
same as a NAA (IEEE) id.
-- Patrick Mansfield
next prev parent reply other threads:[~2003-02-11 16:20 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-02-10 22:45 why store the search type in the ieee name field? Steven Dake
2003-02-10 23:12 ` James Bottomley
2003-02-11 16:20 ` Patrick Mansfield [this message]
2003-02-11 16:43 ` James Bottomley
2003-02-11 16:46 ` Patrick Mansfield
2003-02-11 17:38 ` Steven Dake
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=20030211082039.A27630@beaverton.ibm.com \
--to=patmans@us.ibm.com \
--cc=James.Bottomley@steeleye.com \
--cc=linux-scsi@vger.kernel.org \
--cc=sdake@mvista.com \
/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