From owner-freebsd-arch@FreeBSD.ORG Sat Nov 3 10:50:45 2007 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B5DCD16A419; Sat, 3 Nov 2007 10:50:45 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from fallbackmx02.syd.optusnet.com.au (fallbackmx02.syd.optusnet.com.au [211.29.133.72]) by mx1.freebsd.org (Postfix) with ESMTP id 32E0113C4BB; Sat, 3 Nov 2007 10:50:45 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail06.syd.optusnet.com.au (mail06.syd.optusnet.com.au [211.29.132.187]) by fallbackmx02.syd.optusnet.com.au (8.12.11.20060308/8.12.11) with ESMTP id l9VGn8Di030089; Thu, 1 Nov 2007 03:49:08 +1100 Received: from c211-30-219-213.carlnfd3.nsw.optusnet.com.au (c211-30-219-213.carlnfd3.nsw.optusnet.com.au [211.30.219.213]) by mail06.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id l9VGlrv4006843 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 1 Nov 2007 03:48:07 +1100 Date: Thu, 1 Nov 2007 03:48:08 +1100 (EST) From: Bruce Evans X-X-Sender: bde@delplex.bde.org To: "David O'Brien" In-Reply-To: <20071026163923.GA95109@dragon.NUXI.org> Message-ID: <20071101032901.L4676@delplex.bde.org> References: <20071026163923.GA95109@dragon.NUXI.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-arch@freebsd.org Subject: Re: Filesystem INVARIANTS X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Nov 2007 10:50:45 -0000 On Fri, 26 Oct 2007, David O'Brien wrote: > Hi folks, > > Looking at the code in sys/ufs, I think most of the "DIAGNOSTIC"s should > really be "INVARIANTS"s. In fact there are no "INVARIANTS" in the > filesystem code at this time. I like not having much clutter from INVARIANTS/KASSERT()s, but having things under DIAGNOSTICs isn't right. In fs code, there should be some unconditional checking that the file system isn't corrupt. That doesn't belong under any ifdefs (since the errors it finds are more like errors in user input than logic errors), and it mostly already isn't. > Below is a diff of what I feel should change from "DIAGNOSTIC" to > "INVARIANTS". I have not yet had a chance to benchmark the impact of > this change when only INVARIANTS/INVARIANTS_SUPORT and not DIAGNOSTIC is > set vs. nothing set. This changes a few things that are probably only caused by corrupt file systems, and many things where it isn't clear what the causes might be. OTOH, there are lots of panics that aren't under any ifdef but are probably only caused by logic errors. Bruce