From owner-cvs-all@FreeBSD.ORG Wed Jul 21 16:56:43 2004 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3057116A4CE; Wed, 21 Jul 2004 16:56:43 +0000 (GMT) Received: from pooker.samsco.org (pooker.samsco.org [168.103.85.57]) by mx1.FreeBSD.org (Postfix) with ESMTP id D1F8A43D2F; Wed, 21 Jul 2004 16:56:42 +0000 (GMT) (envelope-from scottl@freebsd.org) Received: from [192.168.0.12] (g4.samsco.home [192.168.0.12]) (authenticated bits=0) by pooker.samsco.org (8.12.11/8.12.10) with ESMTP id i6LH2ltQ063802; Wed, 21 Jul 2004 11:02:49 -0600 (MDT) (envelope-from scottl@freebsd.org) Message-ID: <40FE9FFF.6050702@freebsd.org> Date: Wed, 21 Jul 2004 10:55:27 -0600 From: Scott Long User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7) Gecko/20040514 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Nate Lawson References: <200407211604.i6LG4kFK052991@repoman.freebsd.org> <40FE95FD.6000101@cronyx.ru> <40FE9A94.5090805@root.org> In-Reply-To: <40FE9A94.5090805@root.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, hits=0.0 required=3.8 tests=none autolearn=no version=2.63 X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on pooker.samsco.org cc: cvs-src@freebsd.org cc: src-committers@freebsd.org cc: Robert Watson cc: cvs-all@freebsd.org cc: Roman Kurakin Subject: Re: cvs commit: src/sys/kern kern_shutdown.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jul 2004 16:56:43 -0000 Nate Lawson wrote: > Roman Kurakin wrote: > >> Robert Watson wrote: >> >>> FreeBSD src repository >>> >>> Modified files: >>> sys/kern kern_shutdown.c Log: >>> Don't sync the file system on panic by default. This seems to >>> basically >>> work very infrequently, and often results in a compound panic which >>> confuses debugging; locking/SMP have made the layering violation (and >>> risks) of this more obvious over time. >>> >>> Discussed with: green, bde, et al. >>> >>> Revision Changes Path >>> 1.160 +1 -1 src/sys/kern/kern_shutdown.c > > > > >> How to change behavior? >> >> rik > > > While Robert's followup was very detailed, I think the answer Rik is > looking for is "sysctl kern.sync_on_panic". :) > > -Nate It should be noted that syncing on panic is almost never a good idea. The whole idea of panic() is to signal that the system has gotten into an inconsistent and unrecoverable state. Do you really want to trust it to spam your drive with buffers that are in an unknown state via a set of codepaths that are in an unknown state? It's much better to just step back and let fsck try to repair the damage. I can't remember a single time in the last 4 years when a panic actually successfuly synced out all of the buffers and shutdown the filesystem, so it's not likely that you'll avoid a fsck on reboot with this. Scott