From owner-freebsd-current@FreeBSD.ORG Mon Jul 2 14:12:41 2007 Return-Path: X-Original-To: current@freebsd.org Delivered-To: freebsd-current@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E1B8B16A41F for ; Mon, 2 Jul 2007 14:12:41 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [209.31.154.42]) by mx1.freebsd.org (Postfix) with ESMTP id 7944B13C483 for ; Mon, 2 Jul 2007 14:12:41 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from fledge.watson.org (fledge.watson.org [209.31.154.41]) by cyrus.watson.org (Postfix) with ESMTP id 20E6347EB9; Mon, 2 Jul 2007 10:12:37 -0400 (EDT) Date: Mon, 2 Jul 2007 15:12:37 +0100 (BST) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Nate Lawson In-Reply-To: <4688947D.4040803@root.org> Message-ID: <20070702150825.L61395@fledge.watson.org> References: <54253.1183351841@critter.freebsd.dk> <4688878F.20406@root.org> <20070701.233153.-1343615328.imp@bsdimp.com> <4688947D.4040803@root.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: phk@phk.freebsd.dk, marck@rinet.ru, "M. Warner Losh" , current@freebsd.org Subject: Re: GEOM weirdness with SD flash reader? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 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: Mon, 02 Jul 2007 14:12:42 -0000 On Sun, 1 Jul 2007, Nate Lawson wrote: >> : I disagree. Once scsi_da found the media, it would then somehow need to >> : notify devd (i.e. to automount). If both functions are in devd, the >> : loop becomes: >> : >> : while (1) { >> : camcontrol tur mydev; >> : if (found) >> : notify_automount; >> : break; >> : sleep 3; >> : } >> >> This doesn't belong in devd. >> >> Robert has patches to bring new geom entries into the realm of devd. > > URL? This is from quite a long time ago, so likely needs massaging to apply. http://www.watson.org/~robert/freebsd/geom_devctl.diff The idea is straight forward: when a new geom device is discovered, we issue a notification, which allows devd to respond to events above the newbus layer -- i.e., discover of an fdisk partition table, swap-backed md device, attachment of a new software RAID layer, arrival of a volume by volume name, arrival of a ZFS volume, etc. A simultaneous discussion was going on regarding whether to notify about ifnets directly, and my feeling was basically that since software components care about the distinction between "em0" as a PCI device and "em" as a network interface, and likewise between "ad0" as a disk device" and "ad0s1a" as a partition. The other perspective was that newbus should grow to encapsulate all these name spaces and services -- i.e., establish newbus nodes for md0, lo0, etc, and use some combination of the attachment name space and object types to handle this. I don't really mind what the end solution is, but I found these patches quite useful locally :-). Robert N M Watson Computer Laboratory University of Cambridge