From owner-freebsd-stable@FreeBSD.ORG Fri Jul 20 22:25:45 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 91C4516A417 for ; Fri, 20 Jul 2007 22:25:45 +0000 (UTC) (envelope-from davids@webmaster.com) Received: from mail1.webmaster.com (mail1.webmaster.com [216.152.64.169]) by mx1.freebsd.org (Postfix) with ESMTP id 7987D13C45B for ; Fri, 20 Jul 2007 22:25:45 +0000 (UTC) (envelope-from davids@webmaster.com) Received: from however by webmaster.com (MDaemon.PRO.v8.1.3.R) with ESMTP id md50001597641.msg for ; Fri, 20 Jul 2007 15:15:47 -0700 From: "David Schwartz" To: Date: Fri, 20 Jul 2007 15:15:13 -0700 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.6604 (9.0.2911.0) X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3138 In-Reply-To: <20070719.085101.-1860900987.imp@bsdimp.com> Importance: Normal X-Authenticated-Sender: joelkatz@webmaster.com X-Spam-Processed: mail1.webmaster.com, Fri, 20 Jul 2007 15:15:47 -0700 (not processed: message from trusted or authenticated source) X-MDRemoteIP: 206.171.168.138 X-Return-Path: davids@webmaster.com X-MDaemon-Deliver-To: freebsd-stable@FreeBSD.org X-MDAV-Processed: mail1.webmaster.com, Fri, 20 Jul 2007 15:15:49 -0700 Cc: freebsd-stable@FreeBSD.org Subject: RE: removing external usb hdd without unmounting causes reboot? X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: davids@webmaster.com List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Jul 2007 22:25:45 -0000 > It won't fix it. The problem is dangling pointers to devices that no > longer exist. And like all dangling references after 'free' you get > bad thing happening. > Believe me, if it were easy, it would have been fixed. If it was > moderate to fix, it would have been fixed. It is a hard problem that > people have put lots of hours into to try to resolve. To imply > otherwise is really insulting to all those people (myself include) > that have tried to fix this. There is a simple but ugly way to fix it, similar to what the FireWire layer does. The idea is for the USB layer to create a "device that never goes away" when it first sees the stick and pass that "device that never goes away" to the other layers. Even if the storage device is removed, the device still does not go away. The virtual device can generate errors if the physical device is missing. The virtual device can be cleaned up when the device is unmounted. This will ensure that the 'umount -f' process generates errors (which it will ignore) rather than crashes (which are somewhat harder to ignore). DS