From owner-freebsd-stable@FreeBSD.ORG Sat Jul 21 15:33:09 2007 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 84ED316A419 for ; Sat, 21 Jul 2007 15:33:09 +0000 (UTC) (envelope-from SRS0=VL66=MT=FreeBSD.org=se@srs.kundenserver.de) Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.171]) by mx1.freebsd.org (Postfix) with ESMTP id 1E33813C45E for ; Sat, 21 Jul 2007 15:33:09 +0000 (UTC) (envelope-from SRS0=VL66=MT=FreeBSD.org=se@srs.kundenserver.de) Received: from [80.135.184.152] (helo=[192.168.0.12]) by mrelayeu.kundenserver.de (node=mrelayeu5) with ESMTP (Nemesis), id 0ML25U-1ICGkU2hrB-0004cM; Sat, 21 Jul 2007 17:20:15 +0200 Message-ID: <46A22417.6030204@FreeBSD.org> Date: Sat, 21 Jul 2007 17:19:51 +0200 From: Stefan Esser User-Agent: Thunderbird 2.0.0.5 (Windows/20070716) MIME-Version: 1.0 To: Norberto Meijome References: <200707181142.27240.idiotbg@gmail.com> <200707180839.50113.josh@tcbug.org> <20070718145954.GX36311@gremlin.foo.is> <20070719.084336.-749249732.imp@bsdimp.com> <469F8566.7030905@gmx.de> <20070721110000.5dbf45b2@localhost> In-Reply-To: <20070721110000.5dbf45b2@localhost> X-Enigmail-Version: 0.95.2 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Provags-ID: V01U2FsdGVkX1+uBL+0Y5EMwMbGnOP63S5w3rEOzRhU9ougTjU 7QwsmRoQswA0yCVKXEyyLXAplv73hekegQnGobSgBIID/J+KOw n3QRGBjLqk4fyNeh4BZfg== Cc: "\[LoN\]Kamikaze" , freebsd-stable@freebsd.org, baldur@foo.is Subject: Re: removing external usb hdd without unmounting causes reboot? X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 21 Jul 2007 15:33:09 -0000 Norberto Meijome schrieb: > On Thu, 19 Jul 2007 17:38:14 +0200 > "[LoN]Kamikaze" wrote: > >> As I mentioned earlier I remember it working during the 5.3 era on Stable, at >> some point it worked. I even remember removing my CD-Rom drive from my Thinkpad >> without running atacontrol detach. The system just took it and the drive just >> continued working after I put it back in. > > on 6.2-STABLE (of a few days ago), i have this happening a couple of times with no adverse effect at all. > Burn DVD/Cd, when finished, hald detects the disk, mounts it, /dev/cd0 in /media/whatever. > > i can eject the disk just fine (which in itself is weird, i think).... the device is still there... > umount /dev/cd0 > > works fine and off it goes. other than that, no, i havent tried to access the device in question In that case the device has been mounted R/O before, and if you don't remove it in the middle of a transaction, there is nothing the kernel might want to do with the physical device to unmount it (and even within a transfer, this ought to be caught by the driver). For that reason I had suggested to have a soft-R/O mode for removable devices, which together with a very short flush delay might allow such a device to be mounted R/O "nearly all the time" (tm) ;-) This is not a perfect solution, but it is similar to the way USB sticks are used with Windows/XP: Wait a second or two and remove it. While not perfect this covers the case of MP3 players or digicams that are mounted as USB storage devices, and many other cases. To make this a perfect solution is much harder, but even a simple implementation would be a big step forward. Regards, STefan