From: James Bottomley <James.Bottomley@HansenPartnership.com>
To: Kay Sievers <kay.sievers@vrfy.org>
Cc: Greg KH <greg@kroah.com>,
linux-scsi@vger.kernel.org, Tony Jones <tonyj@suse.de>
Subject: Re: [patch] convert the scsi layer to use struct device
Date: Sat, 15 Mar 2008 13:34:20 -0500 [thread overview]
Message-ID: <1205606060.6767.55.camel@localhost.localdomain> (raw)
In-Reply-To: <1205605604.3109.148.camel@lov.site>
On Sat, 2008-03-15 at 19:26 +0100, Kay Sievers wrote:
> On Sat, 2008-03-15 at 13:01 -0500, James Bottomley wrote:
> > On Sat, 2008-03-15 at 11:16 -0500, James Bottomley wrote:
> > > On Sat, 2008-03-15 at 16:17 +0100, Kay Sievers wrote:
> > > > We just need to create something like a "contains" link from the
> > > > component to the scsi device, and a "enclosure" link at the scsi device
> > > > back to the component, right?
> > >
> > > Assuming you're moving to the single tree model, then I can easily do
> > > this:
> > >
> > > <real enclosure device>/<enclosure>/<enclosure component>/device -> link
> > > to component device
> > >
> > > with a back link in the component device pointing to the enclosure
> > > component.
> > >
> > > The way components work, probably blowing away enclosure_component_class
> > > makes the most sense anyway.
> >
> > OK, so this is the patch doing the above; is this what you had in mind?
> > We're now managing all the links.
>
> Yeah, that looks fine.
>
> While I in general don't really like the <classname>:<devname> symlinks.
> One needs to readdir() the whole device directory to find them, which is
> not nice for a 1:1 relationship link between two devices. I would prefer
> to be able to find an enclosure component for a LUN by simply looking
> at:
> /sys/bus/scsi/devices/0:0:0:0/enclosure/
> instead of searching for that composed link, because one can't predict
> its name. Can there ever be more than one link from a device to an
> enclosure?
>
> Also the "device" link, it will work to use that name, I guess, but it
> has usually a different meaning, as all "device" links are just
> meaninglessly pointing to the next parent device with !SYSFS_DEPRECATED.
> With !SYSFS_DEPRECATED <classname>:<devname> links are no longer
> created for any device, the class device directories just live in a
> subdirectory with the class name.
Right, but we can't do that with enclosure components, otherwise it
really will be a multi rooted tree.
> Do you prefer the <classname>:<devname>, "device" names?
I'm not wedded to the name. I like the backlink because it tells me
where a device is in the enclosure when I look at it, but it could be
called anything. I chose those names to match what's in 2.6.24, but I
suppose there aren't very many users yet, since it was new functionality
in 2.6.24.
If the backlink were called "enclosure_component", that would probably
be fine. Not sure I have a better name than "device" for the actual
device in the enclosure slot, though.
James
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2008-03-15 18:34 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-13 21:06 [patch] convert the scsi layer to use struct device Greg KH
2008-03-14 14:13 ` Hannes Reinecke
2008-03-14 17:15 ` James Bottomley
2008-03-14 21:20 ` James Bottomley
2008-03-14 21:58 ` Kay Sievers
2008-03-15 14:19 ` James Bottomley
2008-03-15 15:17 ` Kay Sievers
2008-03-15 16:16 ` James Bottomley
2008-03-15 18:01 ` James Bottomley
2008-03-15 18:26 ` Kay Sievers
2008-03-15 18:34 ` James Bottomley [this message]
2008-03-15 20:38 ` Stefan Richter
2008-03-15 18:04 ` Kay Sievers
2008-03-15 18:31 ` James Bottomley
2008-03-15 18:56 ` Kay Sievers
2008-03-15 19:33 ` James Bottomley
2008-03-15 19:43 ` Kay Sievers
2008-03-16 20:21 ` James Smart
2008-03-16 21:04 ` Kay Sievers
2008-03-17 4:15 ` James Smart
2008-03-17 5:35 ` Greg KH
2008-03-17 12:18 ` James Smart
2008-03-17 13:40 ` Kay Sievers
2008-03-17 13:55 ` James Bottomley
2008-03-17 17:57 ` James Bottomley
2008-03-19 0:48 ` Greg KH
2008-03-19 20:38 ` James Bottomley
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=1205606060.6767.55.camel@localhost.localdomain \
--to=james.bottomley@hansenpartnership.com \
--cc=greg@kroah.com \
--cc=kay.sievers@vrfy.org \
--cc=linux-scsi@vger.kernel.org \
--cc=tonyj@suse.de \
/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