From owner-freebsd-current@FreeBSD.ORG Tue Jan 25 03:46:51 2005 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3678E16A4CE; Tue, 25 Jan 2005 03:46:51 +0000 (GMT) Received: from harmony.village.org (rover.village.org [168.103.84.182]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6742B43D1D; Tue, 25 Jan 2005 03:46:50 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from localhost (warner@rover2.village.org [10.0.0.1]) by harmony.village.org (8.13.1/8.13.1) with ESMTP id j0P3jOwj042513; Mon, 24 Jan 2005 20:45:24 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Mon, 24 Jan 2005 20:46:44 -0700 (MST) Message-Id: <20050124.204644.32725683.imp@bsdimp.com> To: rwatson@freebsd.org From: "M. Warner Losh" In-Reply-To: References: <20050124055703.GA40104@users.altadena.net> X-Mailer: Mew version 3.3 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit cc: current@freebsd.org cc: pete@altadena.net Subject: Re: Devd event from GEOM? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Jan 2005 03:46:51 -0000 In message: Robert Watson 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