From owner-freebsd-arch@FreeBSD.ORG Wed Sep 17 13:21:27 2003 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BAF1C16A4C1; Wed, 17 Sep 2003 13:21:27 -0700 (PDT) Received: from fledge.watson.org (fledge.watson.org [204.156.12.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6544F43FD7; Wed, 17 Sep 2003 13:21:26 -0700 (PDT) (envelope-from robert@fledge.watson.org) Received: from fledge.watson.org (localhost [127.0.0.1]) by fledge.watson.org (8.12.9/8.12.9) with ESMTP id h8HKJwN6053531; Wed, 17 Sep 2003 16:19:58 -0400 (EDT) (envelope-from robert@fledge.watson.org) Received: from localhost (robert@localhost)h8HKJwex053528; Wed, 17 Sep 2003 16:19:58 -0400 (EDT) Date: Wed, 17 Sep 2003 16:19:57 -0400 (EDT) From: Robert Watson X-Sender: robert@fledge.watson.org To: Poul-Henning Kamp In-Reply-To: <30912.1063828673@critter.freebsd.dk> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: bms@spc.org cc: "M. Warner Losh" cc: freebsd-arch@freebsd.org Subject: Re: devd limitations / automounting removable storage X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Sep 2003 20:21:27 -0000 On Wed, 17 Sep 2003, Poul-Henning Kamp wrote: > In message , John Baldwin writes: > > >Maybe have GEOM send events when mountable entities show up? > > There is only one question to figure out: Should it happen at the > bottom or the top of GEOM ? > > At the bottom, your CF card would result in a single event on /dev/ad4, > at the top you'd likely get two events, one for /dev/ad4 and one for > /dev/ad4s1 (or whatever other gadgets geom autodiscovers). > > Apart from that, it's just a matter of telling me how to send the > event... This is a very similar concern to the question I raised at BSDCon about distinguishing network interfaces at the newbus and network service levels. My temptation would be to assign a "layer" as well as a device name to devices when they are announced. I.e., Layer Device Meaning newbus xl0 A device named xl0 is now available devfs net/xl0 A device node named net/xl0 is now available ifnet xl0 A network interface named xl0 is now available newbus ad0 A device named ad0 is now available devfs ad0 A device node named ad0 is now available geom ad0 A storage device named ad0 is now available We might skip the devfs layer since it's probably implicit in the completion of ifnet_attach() and disk_create(), but it's worth thinking about. This would allow ifconfig commands to be issued once the network device is available, rather than once newbus has attached an xl0. Or for geom to announce ad0s1e even though newbus doesn't know about it. Or for devd to handle the introduction of synthetic interfaces such as vlan, tun, etc, which aren't visible to newbus. Or for the device driver names and interface names to differ (or for a non-one-one mapping, interface renames, etc). Robert N M Watson FreeBSD Core Team, TrustedBSD Projects robert@fledge.watson.org Network Associates Laboratories