From owner-freebsd-current@FreeBSD.ORG Mon Jul 2 04:03:49 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 162CB16A469 for ; Mon, 2 Jul 2007 04:03:49 +0000 (UTC) (envelope-from nate@root.org) Received: from root.org (root.org [67.118.192.226]) by mx1.freebsd.org (Postfix) with ESMTP id D44E113C4B8 for ; Mon, 2 Jul 2007 04:03:48 +0000 (UTC) (envelope-from nate@root.org) Received: (qmail 47661 invoked from network); 2 Jul 2007 04:03:50 -0000 Received: from ppp-71-139-42-13.dsl.snfc21.pacbell.net (HELO ?10.0.5.18?) (nate-mail@71.139.42.13) by root.org with ESMTPA; 2 Jul 2007 04:03:50 -0000 Message-ID: <4688791D.6050007@root.org> Date: Sun, 01 Jul 2007 21:03:41 -0700 From: Nate Lawson User-Agent: Thunderbird 2.0.0.4 (X11/20070617) MIME-Version: 1.0 To: "M. Warner Losh" References: <46880400.70808@root.org> <20070702000903.L81781@woozle.rinet.ru> <46880F1C.3020602@root.org> <20070701.215557.1373430453.imp@bsdimp.com> In-Reply-To: <20070701.215557.1373430453.imp@bsdimp.com> X-Enigmail-Version: 0.95.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: 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 04:03:49 -0000 M. Warner Losh wrote: > In message: <46880F1C.3020602@root.org> > Nate Lawson writes: > : Yes, you're exactly right. However, shouldn't a read from a device > : trigger a re-taste if the media is removable? > > I don't think it does. The driver is expected to poll, however... > > : So the fdisk of da2 > : should have caused it to re-read the MBR and create /dev/da2s1. I think > : maybe there should be a flag set for devices with removable media that > : causes the device to be re-tasted on every mount request. > > Is there even a removable flag to disks? In SCSI there is, removable flag combined with medium not present: da2 at umass-sim1 bus 1 target 0 lun 2 da2: Removable Direct Access SCSI-0 device ^^^^^^^^^ da2: 40.000MB/s transfers da2: Attempt to query device size failed: NOT READY, Medium not present What if we kicked off a thread to run every 3 seconds that did a quick poll of such devices and sent a devd notify if they arrived (i.e. medium present)? It wouldn't work for floppy drives, but we could make this part of the da driver or something in usermode like devd itself calling camcontrol? -- Nate