Re: Devd event from GEOM?

From: M. Warner Losh <imp_at_bsdimp.com>
Date: Mon, 24 Jan 2005 20:46:44 -0700 (MST)
In message: <Pine.NEB.3.96L.1050124095359.63183B-100000_at_fledge.watson.org>
            Robert Watson <rwatson_at_freebsd.org> writes:
: 
: On Sun, 23 Jan 2005, Pete Carah wrote:
: 
: > Geom doesn't feed node-creations to devd in 5.3.  This would be VERY
: > useful for letting ordinary non-programmer users access pen drives,
: > among other things (floppies come to mind too...).  (or mount e.g. a pen
: > drive as part of an authentication system where no-one is yet logged in,
: > so can't manually mount...) 
: > 
: > umass0 comes in to devd, but this isn't useful for use in "mount".  One
: > needs the disk device nodes.  I suppose one *could* parse dmesg for the
: > info (or maybe sysctl) but that smacks of a serious kluge.  (not to
: > mention that the slice table isn't represented in dmesg anyhow, and
: > practically nothing is in sysctl...) 
: > 
: > Does this yet happen in any later version (RELENG_5 or HEAD)?  If not,
: > is there anyone planning or working on it? 
: > 
: > It *does* work in Solaris and IRIX, (I know - we aren't them...)  I
: > don't know about any Linux or other *BSD version either. 
: > 
: > Geom is modular enough that this shouldn't be difficult... 
: 
: I used the attached patches do announce storage device arrival on my
: notebook so that I can do auto-mounting of USB storage.  There appears to
: be some disagreement regarding layering: my opinion has generally been
: that since there are multiple layers involved, we should announce both the
: layer and the device, for example:
: 
:   Network stack says "ifnet fxp0 arrived"
: 
: separately from:
: 
:   /dev says "/dev/net/fxp0 arrived"

and newbus says fxp0 arrived :-)

: Since they constitute different "things" with quite different management
: properties.  This also provides additional contextual information: rather
: than devd having to guess what type of object a device node is using name
: matching, by learning about it through geom or the network stack, it knows
: what kind it is up front in a strong way. 

While I tend to agree, I do think that GEOM is the wrong layer to
announce things from.  The more correct layer would be /dev, since you
are again assuming that a GEOM that's created with name foo is
accessible via /dev/foo.

Warner
Received on Tue Jan 25 2005 - 02:46:51 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:26 UTC