From owner-freebsd-current@FreeBSD.ORG Tue Jan 11 20:56:44 2011 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E73531065694 for ; Tue, 11 Jan 2011 20:56:44 +0000 (UTC) (envelope-from spawk@acm.poly.edu) Received: from acm.poly.edu (acm.poly.edu [128.238.9.200]) by mx1.freebsd.org (Postfix) with ESMTP id 853118FC08 for ; Tue, 11 Jan 2011 20:56:44 +0000 (UTC) Received: (qmail 46328 invoked from network); 11 Jan 2011 20:50:03 -0000 Received: from unknown (HELO ?10.0.0.179?) (spawk@128.238.64.31) by acm.poly.edu with CAMELLIA256-SHA encrypted SMTP; 11 Jan 2011 20:50:03 -0000 Message-ID: <4D2CC27F.7040206@acm.poly.edu> Date: Tue, 11 Jan 2011 15:50:07 -0500 From: Boris Kochergin User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.9.2.12) Gecko/20101106 Thunderbird/3.1.6 MIME-Version: 1.0 To: "C. P. Ghost" References: <4D2CBE45.90209@delphij.net> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-current@freebsd.org, d@delphij.net Subject: Re: why panic(9) ? 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: Tue, 11 Jan 2011 20:56:45 -0000 On 01/11/11 15:37, C. P. Ghost wrote: > On Tue, Jan 11, 2011 at 9:32 PM, Xin LI wrote: >> -----BEGIN PGP SIGNED MESSAGE----- >> Hash: SHA256 >> >> On 01/11/11 12:11, David DEMELIER wrote: >>> Yes, why this function exists? There is no way to solve a problem >>> without panic'ing? Is panic really needed? Imagine someone working on >> [...] >> >> Panic is used to stop the kernel in an aggressive way when data damage >> is detected and the damage is already beyond what the kernel can recover >> from. >> >> The kernel can and should be made more robust but no, I don't think we >> can totally eliminate panic(). > Exactly. One area where the kernel should be made more robust > is UFS with disappearing disks (e.g. USB mounted file systems, > or, as recently happened here with a loose external SATA cable). > Panicing here is REALLY annoying. ;-) Getting slightly off-topic here, but... there was progress made on this front a while ago. You can reliably detach at least USB storage with a mounted MSDOSFS or UFS filesystem without soft updates and not risk a system panic. There will be a panic if soft updates are enabled on UFS, however, at least as of my last test in 2010. -Boris >> Cheers, >> - -- >> Xin LI http://www.delphij.net/ >> FreeBSD - The Power to Serve! Live free or die > -cpghost. >