From owner-freebsd-current@FreeBSD.ORG Mon Jul 2 05:32:18 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 476C216A400 for ; Mon, 2 Jul 2007 05:32:18 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 08D2313C44B for ; Mon, 2 Jul 2007 05:32:17 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.13.8/8.13.4) with ESMTP id l625VC1R005203; Sun, 1 Jul 2007 23:31:12 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Sun, 01 Jul 2007 23:31:53 -0600 (MDT) Message-Id: <20070701.233153.-1343615328.imp@bsdimp.com> To: nate@root.org From: "M. Warner Losh" In-Reply-To: <4688878F.20406@root.org> References: <54253.1183351841@critter.freebsd.dk> <4688878F.20406@root.org> X-Mailer: Mew version 5.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0 (harmony.bsdimp.com [127.0.0.1]); Sun, 01 Jul 2007 23:31:13 -0600 (MDT) Cc: phk@phk.freebsd.dk, marck@rinet.ru, 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 05:32:18 -0000 In message: <4688878F.20406@root.org> Nate Lawson writes: : Poul-Henning Kamp wrote: : > In message <4688830C.6050701@root.org>, Nate Lawson writes: : > : >> camcontrol tur (test unit ready) will return an error or success if the : >> medium is now present. Kicking off a process to do that when a : >> removable media da(4) device appears seems like a good idea. It could : >> also be a thread in devd. : > : > I would call that "The Linux Solution" :-) : > : > The right place to poll is from scsi_da. : : 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. Warner