From owner-freebsd-fs Tue Apr 18 4:37:51 2000 Delivered-To: freebsd-fs@freebsd.org Received: from ewok.creative.net.au (fuzzy.aussie.com.au [203.30.44.82]) by hub.freebsd.org (Postfix) with SMTP id 3BBAB37B523 for ; Tue, 18 Apr 2000 04:37:47 -0700 (PDT) (envelope-from freebsd@ewok.creative.net.au) Received: (qmail 72570 invoked by uid 1008); 18 Apr 2000 11:37:42 -0000 Date: Tue, 18 Apr 2000 19:37:42 +0800 From: Adrian Chadd To: freebsd-fs@freebsd.org Subject: FFS and ints Message-ID: <20000418193741.E71428@ewok.creative.net.au> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.95.4i Sender: owner-freebsd-fs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Hi, I just waded through a friends of a friends FFS panic, and it turns uot that the cg_rotor, cg_irotor and cg_frotor values were all outrageously wrong. Now, how they got to be wrong is another matter entirely, but the thing that kept tripping him was that fsck's cg checks were doing stuff like : if (cg->cg_frotor < newcg->cg_ndblk) newcg->cg_frotor = cg->cg_frotor; else newcg->cg_frotor = 0; Now, this makes sense EXCEPT that cg_rotor/frotor/irotor are defined as int32_ts which mean any weirdnesses that corrupt these values to negative values will not be picked up in fsck. So, my question is this: should the cg definition change to change things that should be unsigned to unsigned, or should fsck change and we leave the kernel alone? Adrian To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-fs" in the body of the message