Date: Thu, 1 Nov 2007 03:48:08 +1100 (EST) From: Bruce Evans <brde@optusnet.com.au> To: "David O'Brien" <obrien@freebsd.org> Cc: freebsd-arch@freebsd.org Subject: Re: Filesystem INVARIANTS Message-ID: <20071101032901.L4676@delplex.bde.org> In-Reply-To: <20071026163923.GA95109@dragon.NUXI.org> References: <20071026163923.GA95109@dragon.NUXI.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20071101032901.L4676>