Devd event from GEOM?

M. Warner Losh imp at bsdimp.com
Mon Jan 24 19:46:51 PST 2005


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


More information about the freebsd-current mailing list