Date: Mon, 25 Nov 2002 18:16:25 +1100 (EST) From: Bruce Evans <bde@zeta.org.au> To: Julian Elischer <julian@elischer.org> Cc: fs@FreeBSD.ORG, <mckusick@mckusick.com> Subject: Re: ufs types Message-ID: <20021125181030.T56011-100000@gamplex.bde.org> In-Reply-To: <Pine.BSF.4.21.0211221642100.15030-100000@InterJet.elischer.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20021125181030.T56011-100000>