Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 24 Jan 2005 20:46:44 -0700 (MST)
From:      "M. Warner Losh" <imp@bsdimp.com>
To:        rwatson@freebsd.org
Cc:        pete@altadena.net
Subject:   Re: Devd event from GEOM?
Message-ID:  <20050124.204644.32725683.imp@bsdimp.com>
In-Reply-To: <Pine.NEB.3.96L.1050124095359.63183B-100000@fledge.watson.org>
References:  <20050124055703.GA40104@users.altadena.net> <Pine.NEB.3.96L.1050124095359.63183B-100000@fledge.watson.org>

next in thread | previous in thread | raw e-mail | index | archive | help
In message: <Pine.NEB.3.96L.1050124095359.63183B-100000@fledge.watson.org>
            Robert Watson <rwatson@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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050124.204644.32725683.imp>