From owner-freebsd-current@FreeBSD.ORG Mon Feb 28 02:51:48 2005 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 438D516A4CE for ; Mon, 28 Feb 2005 02:51:48 +0000 (GMT) Received: from gw.catspoiler.org (217-ip-163.nccn.net [209.79.217.163]) by mx1.FreeBSD.org (Postfix) with ESMTP id CA3FC43D4C for ; Mon, 28 Feb 2005 02:51:47 +0000 (GMT) (envelope-from truckman@FreeBSD.org) Received: from FreeBSD.org (mousie.catspoiler.org [192.168.101.2]) by gw.catspoiler.org (8.13.1/8.13.1) with ESMTP id j1S2peVt012495; Sun, 27 Feb 2005 18:51:44 -0800 (PST) (envelope-from truckman@FreeBSD.org) Message-Id: <200502280251.j1S2peVt012495@gw.catspoiler.org> Date: Sun, 27 Feb 2005 18:51:40 -0800 (PST) From: Don Lewis To: kris@obsecurity.org In-Reply-To: <20050227050523.GA92300@xor.obsecurity.org> MIME-Version: 1.0 Content-Type: TEXT/plain; charset=us-ascii cc: current@FreeBSD.org Subject: Re: fsck_ufs: cannot alloc 3166749884 bytes for inoinfo X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Feb 2005 02:51:48 -0000 On 26 Feb, Kris Kennaway wrote: > A recent panic left my FS with some serious corruption, which fsck is > unable to repair: > > # fsck_ufs -b 376512 -fy /var > Alternate super block location: 376512 > ** /dev/twed0s1e > ** Last Mounted on > ** Phase 1 - Check Blocks and Sizes > fsck_ufs: cannot alloc 3166749884 bytes for inoinfo > > (same holds for any superblock I've tried). It looks like the problem is that cg_initediblk is corrupted in one of the cylinder groups. It should never be larger than fs_ipg, and pass5() silently enforces this limit. We could do the same in pass1(), except that if it ever got set to too small a value, such as 0, fsck would think a bunch of files were missing.