From owner-freebsd-stable@FreeBSD.ORG Wed Jul 18 17:37:37 2007 Return-Path: X-Original-To: freebsd-stable@freebsd.org Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2502716A411 for ; Wed, 18 Jul 2007 17:37:37 +0000 (UTC) (envelope-from zbeeble@gmail.com) Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.172]) by mx1.freebsd.org (Postfix) with ESMTP id 8FD1113C4D0 for ; Wed, 18 Jul 2007 17:37:36 +0000 (UTC) (envelope-from zbeeble@gmail.com) Received: by ug-out-1314.google.com with SMTP id o4so402927uge for ; Wed, 18 Jul 2007 10:37:35 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; b=XZMRUlqm/QbRa80trUWT7UFDYO8Gp2s5o6vPdCeMbEx8FZuhenzb/y6FeNXjIz89aMMPWHeXU9M3ToFLSzW1R5ghdsg5ydNDzBGj/oWuqC9eVdHn3qFQwpaL6vdGwV0zGYIu2VtjOKwi0n1MmrQ3oR6TBGMFmXtePeMnUevPT/Y= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; b=oubwKIQh7PY9dqF1fPHt5ma/VSVPmFmRJz2tjYuUjup/xHLN3oeGnFfTKGe7QCrZ9IUOJczJA50E1ih60FQ93H3pZPqqpMqbtmMhitSAPfBILWtxy6Bdjp75/y7I2s1Ymwzo1ZlJZBcja/svBkFbrH86ZUla6XSft6sEnwFzPfY= Received: by 10.82.182.1 with SMTP id e1mr2469362buf.1184778702839; Wed, 18 Jul 2007 10:11:42 -0700 (PDT) Received: by 10.82.176.13 with HTTP; Wed, 18 Jul 2007 10:11:42 -0700 (PDT) Message-ID: <5f67a8c40707181011n768ad311y9a9dd76a59dde428@mail.gmail.com> Date: Wed, 18 Jul 2007 13:11:42 -0400 From: "Zaphod Beeblebrox" To: "Baldur Gislason" In-Reply-To: <20070718163642.GY36311@gremlin.foo.is> MIME-Version: 1.0 References: <200707181541.l6IFf4ht051775@lurza.secnetix.de> <200707181830.48727.idiotbg@gmail.com> <20070718163642.GY36311@gremlin.foo.is> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: LoN_Kamikaze@gmx.de, freebsd-stable@freebsd.org, Momchil Ivanov , josh@tcbug.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 List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Jul 2007 17:37:37 -0000 Nobody's said what the problem is. I'm not a filesystem code monkey, but IIRC, the problem is that the filesystem plays fast and loose with pointers and is too closely related to the VM. One solution is (as mentioned) a userland filesystem that doesn't panic. automount approximates this if you set the disconnect interval short (< 5 seconds). The other way to look at this, though, is the general goal of "not panicing" when it can be avoided. As a research OS, it's my feeling that BSD derived unixes have followed the "if in doubt, panic" regime. I don't think this is appropriate to a modern desktop or server OS. To my mind, an OS should only panic if there are indications of hardware corruption in a subsystem that can't be turned off. Ie: memory bad: panic; controller bad, turn off controller. In this particular case, we have unmount -f. If there are no dirty buffers, the USB system triggering the equivalent of unomunt -f should succeed. If we only mount usb devices async, this should be sufficient for most cases. If there are dirty buffers, what do we loose by just forgetting about them? The filesystem on the device is already as corrupt as its going to be...