From owner-freebsd-fs Sun Nov 24 23: 3:12 2002 Delivered-To: freebsd-fs@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A409B37B401 for ; Sun, 24 Nov 2002 23:03:11 -0800 (PST) Received: from mailman.zeta.org.au (mailman.zeta.org.au [203.26.10.16]) by mx1.FreeBSD.org (Postfix) with ESMTP id 48A9343E3B for ; Sun, 24 Nov 2002 23:03:10 -0800 (PST) (envelope-from bde@zeta.org.au) Received: from bde.zeta.org.au (bde.zeta.org.au [203.2.228.102]) by mailman.zeta.org.au (8.9.3/8.8.7) with ESMTP id SAA10082; Mon, 25 Nov 2002 18:03:02 +1100 Date: Mon, 25 Nov 2002 18:16:25 +1100 (EST) From: Bruce Evans X-X-Sender: bde@gamplex.bde.org To: Julian Elischer Cc: fs@FreeBSD.ORG, Subject: Re: ufs types In-Reply-To: Message-ID: <20021125181030.T56011-100000@gamplex.bde.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-fs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org On Fri, 22 Nov 2002, Julian Elischer wrote: > We had a system on site today that fell over every time re tried to boot > it. Causing delays in probably many millions of dollars of transfers. > The reason was a currupt word in the cylinder group summary information. > a word had been trashed becoming -ve, and fsck didn't check against > -ve numbers in that (a rotor value). Noticing that most fields are not > checked against being -ve in fsck we started looking at fixing it.. > until we realised that the far quicker answer was to define them to be > unsigned in ufs.h and just fix the compile errors.. The values are > usually checked for reasonable +ve values. > > Does anyone have a reason why we should not do this in FreeBSD? Yes. Unsigned types give a morass or (un)sign extension and (non)overflow problems, especially when they are mixed with signed types. Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-fs" in the body of the message