linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg KH <greg@kroah.com>
To: linux-hotplug@vger.kernel.org
Subject: Re: Which node has the device been bound to?
Date: Mon, 03 Jun 2002 23:50:41 +0000	[thread overview]
Message-ID: <marc-linux-hotplug-102314846101488@msgid-missing> (raw)
In-Reply-To: <marc-linux-hotplug-102266789207618@msgid-missing>

On Tue, Jun 04, 2002 at 01:37:13AM +0200, Oliver Neukum wrote:
> Am Dienstag, 4. Juni 2002 01:16 schrieb Greg KH:
> > On Tue, Jun 04, 2002 at 01:05:09AM +0200, Oliver Neukum wrote:
> > > > > I can't come up with anything better than a set of ioctls that
> > > > > return the contents of the individual files. And I know that this
> > > > > is ugly. I don't claim that this is a good solution, just that
> > > > > it's the only solution I have and that there's a race otherwise.
> > > > > You simply cannot use names, thus parsing files for the name of
> > > > > the node won't work.
> > > >
> > > > Or we could just drop the whole idea of using ioctl() and live with
> > > > the "instability" of parsing a filesystem :)
> > >
> > > There is no such thing is an acceptable race condition.
> >
> > Then use the device tree in driverfs as a "hint" as to where you might
> > find your device.  Then rely on other things (fs labels, usb serial
> > numbers, ethernet mac addresses, etc.) to verify if the device you are
> > talking to really is the one you think it is.
> 
> The project started out to solve the problem once and forever and now we 
> are back at several heuristics.

Wait, what project?  linux-hotplug was created to "solve" the initial
problem of people calling /sbin/hotplug in different ways, which broke
userspace tools.  It then became a forum for the linux-hotplug package,
and general hotplugging issues.

It was never created to solve "the hotplugging/device naming/persistent
path/fish slicing and dicing" problem.

> IMHO this defeats the purpose.

What purpose?  driverfs?  driverfs is for a system-wide driver topology,
and to provide a driver specific place for driver specific interface
files (instead of /proc).  And it meets that purpose quite well.

Just because we can't uniquely, and race-free identify a device node
with a physical device (either mapping, you choose) doesn't mean all is
lost.  We've never been able to do that :)

thanks,

greg k-h

_______________________________________________________________

Don't miss the 2002 Sprint PCS Application Developer's Conference
August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm

_______________________________________________
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:[~2002-06-03 23:50 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-05-29 10:23 Which node has the device been bound to? Kim Deokhwan
2002-05-31 16:53 ` Oliver Neukum
2002-05-31 17:12 ` Dmitri
2002-05-31 18:26 ` Greg KH
2002-06-01  0:05 ` Oliver Neukum
2002-06-01  0:21 ` Greg KH
2002-06-01  1:14 ` Oliver Neukum
2002-06-03 18:00 ` Greg KH
2002-06-03 21:09 ` Oliver Neukum
2002-06-03 21:58 ` Greg KH
2002-06-03 22:43 ` Oliver Neukum
2002-06-03 22:46 ` Greg KH
2002-06-03 23:05 ` Oliver Neukum
2002-06-03 23:16 ` Greg KH
2002-06-03 23:37 ` Oliver Neukum
2002-06-03 23:50 ` Greg KH [this message]
2002-06-04 19:00 ` David Brownell

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=marc-linux-hotplug-102314846101488@msgid-missing \
    --to=greg@kroah.com \
    --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).