linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kay Sievers <kay.sievers@vrfy.org>
To: linux-hotplug@vger.kernel.org
Subject: Re: work-around for video4linux sysfs
Date: Thu, 02 Aug 2007 23:02:31 +0000	[thread overview]
Message-ID: <1186095751.3443.49.camel@lov.localdomain> (raw)
In-Reply-To: <20070731195136.GW9881@outflux.net>


On Thu, 2007-08-02 at 17:39 -0500, Linas Vepstas wrote:
> On Fri, Aug 03, 2007 at 12:30:12AM +0200, Kay Sievers wrote:
> > On Thu, 2007-08-02 at 07:05 -0700, Kees Cook wrote:
> > > 
> > > pci-0000:00:0e.0-scsi-0:0:0:0-part1
> > >                   ^driver
> > >                           ^simple enumeration
> > 
> > It's the subsystem not the driver. And it's not an enumeration based on
> > discovery order, it's the PCI slot number which doesn't change, also
> 
> I haven't tried recently, but in the "good old days", I used to
> get bitten hard every time I shuffled around the PCI cards from
> one slot to another, to make room for one more.

"Shuffling around" is absolutly expected to change "by-path" links,
that's actually the correct and expected behavior. :)
There are by-id links, which are independent of the
path/port/slot/numbers. For block devices there are by-uuid and
by-label, which don't change by moving hardware around.

> > SCSI uses stable interface and port numbers here. 
> 
> Hehe. SCSI LUN's can change when one is adding and removing failed 
> disks, or shuffling around so that one can re-cable.  That was
> another source of heartburn.

Same here, by-path must change if the path to the hardware changes.
Depending on the setup, these links are more or less useful than the
links based on the content or properties owned by the hardware.

> The only viable solution is to work off some unique ID on the 
> device (e.g. a MAC address on ethernet).

The MAC is fine for most of the simple setups, yes. But there are lots
of cases where they just don't work. There are whole architectures in
the kernel which only use random MAC addresses and you need to fall back
to the path to the device.

Oh, and there are a lot of properties on other subsystems which can be
used to create reliable device names. Depending on the actual hardware
or the setup, there is no general rule which category of links is more
viable than the other, just look what /dev/disk offers, they are all
needed.

Kay


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

  parent reply	other threads:[~2007-08-02 23:02 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-31 19:51 work-around for video4linux sysfs Kees Cook
2007-08-01 20:52 ` Greg KH
2007-08-01 21:31 ` Kees Cook
2007-08-01 21:58 ` Greg KH
2007-08-01 22:22 ` Kees Cook
2007-08-01 22:39 ` Greg KH
2007-08-01 23:14 ` Kees Cook
2007-08-01 23:28 ` Greg KH
2007-08-01 23:48 ` Kees Cook
2007-08-02  9:24 ` Kay Sievers
2007-08-02 14:05 ` Kees Cook
2007-08-02 22:30 ` Kay Sievers
2007-08-02 22:39 ` Linas Vepstas
2007-08-02 23:02 ` Kay Sievers [this message]
2007-08-07  0:39 ` Kees Cook
2007-08-07  9:24 ` Kay Sievers
2007-08-07 19:36 ` Kees Cook
2007-08-07 22:58 ` Kay Sievers
2007-08-07 23:18 ` Kees Cook
2007-08-08 10:48 ` Kay Sievers
2007-08-09 19:38 ` Kees Cook

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=1186095751.3443.49.camel@lov.localdomain \
    --to=kay.sievers@vrfy.org \
    --cc=linux-hotplug@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).