From owner-freebsd-stable@FreeBSD.ORG Wed Aug 31 16:13:37 2011 Return-Path: Delivered-To: stable@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 065D4106564A; Wed, 31 Aug 2011 16:13:37 +0000 (UTC) (envelope-from egrosbein@rdtc.ru) Received: from eg.sd.rdtc.ru (unknown [IPv6:2a03:3100:c:13::5]) by mx1.freebsd.org (Postfix) with ESMTP id 666268FC16; Wed, 31 Aug 2011 16:13:36 +0000 (UTC) Received: from eg.sd.rdtc.ru (localhost [127.0.0.1]) by eg.sd.rdtc.ru (8.14.5/8.14.5) with ESMTP id p7VGDWKZ046077; Wed, 31 Aug 2011 23:13:32 +0700 (NOVST) (envelope-from egrosbein@rdtc.ru) Message-ID: <4E5E5DA7.1010802@rdtc.ru> Date: Wed, 31 Aug 2011 23:13:27 +0700 From: Eugene Grosbein User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; ru-RU; rv:1.9.2.13) Gecko/20110112 Thunderbird/3.1.7 MIME-Version: 1.0 To: Adam Vande More References: <4E5E46B1.4070408@rdtc.ru> In-Reply-To: Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: 8bit Cc: stable@FreeBSD.org, fs@FreeBSD.org Subject: Re: Unfixable UFS2 corruption X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Aug 2011 16:13:37 -0000 31.08.2011 23:02, Adam Vande More пишет: > Long story short: my /usr/local UFS2 filesystem somehow got corrupted > and "fsck -y" in single user mode does not fix it. > > Not sure if this helps or not but on rare occasion I've had to run fsck twice consecutively to fix a FS. Not this time - fsck does NOT find any problems in this file system. Now I think fsck_ffs needs a patch: --- sbin/fsck_ffs/dir.c.orig 2011-08-31 22:54:23.000000000 +0700 +++ sbin/fsck_ffs/dir.c 2011-08-31 22:54:48.000000000 +0700 @@ -225,7 +225,7 @@ type = dp->d_type; if (dp->d_reclen < size || idesc->id_filesize < size || - namlen > MAXNAMLEN || + namlen == 0 || namlen > MAXNAMLEN || type > 15) goto bad; for (cp = dp->d_name, size = 0; size < namlen; size++) Comments? Eugene Grosbein