From owner-freebsd-current@FreeBSD.ORG Sun Nov 6 23:19:30 2005 Return-Path: X-Original-To: freebsd-current@freebsd.org 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 4192016A41F for ; Sun, 6 Nov 2005 23:19:30 +0000 (GMT) (envelope-from ob@gruft.de) Received: from obh.snafu.de (obh.snafu.de [213.73.92.34]) by mx1.FreeBSD.org (Postfix) with ESMTP id A16C643D45 for ; Sun, 6 Nov 2005 23:19:27 +0000 (GMT) (envelope-from ob@gruft.de) Received: from ob by obh.snafu.de with local (Exim 4.54 (FreeBSD)) id 1EYtnJ-000Cjl-WA for freebsd-current@freebsd.org; Mon, 07 Nov 2005 00:19:25 +0100 Date: Mon, 7 Nov 2005 00:19:25 +0100 From: Oliver Brandmueller To: freebsd-current@freebsd.org Message-ID: <20051106231925.GC23749@e-Gitt.NET> Mail-Followup-To: freebsd-current@freebsd.org References: <84099c3d0511030325q6d1df92ag77310ff1b03a2d15@mail.gmail.com> <84099c3d0511030425q3592a288he254cb5f97f976b6@mail.gmail.com> <20051106144917.GA81664@comp.chem.msu.su> <20051106211124.GL91530@cell.sick.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20051106211124.GL91530@cell.sick.ru> User-Agent: Mutt/1.5.11 Sender: Oliver Brandmueller Subject: Re: May be a bug in fsck [ after super block crash on 5.4-STABLE ] X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 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: Sun, 06 Nov 2005 23:19:30 -0000 Hi. On Mon, Nov 07, 2005 at 12:11:24AM +0300, Gleb Smirnoff wrote: > X> That's correct. Fortunately, given that we have some ways to validate > X> whether the superblock is valid, it is not too hard to automatically > X> detect which type the FS actually is. > > I think this feature is already present in libufs, since dumpfs(8) > can detect UFS1/UFS2 type of filesystem. Well, the original problem was in incorrect superblock. To find the second one you need to check 32 or 160 for an valid superblock. If you can get the information if it's UFS1 or UFS2 only from the superblock, then you gotta check both (in the worst case). Kinda chicken and egg problem. - Oliver -- | Oliver Brandmueller | Offenbacher Str. 1 | Germany D-14197 Berlin | | Fon +49-172-3130856 | Fax +49-172-3145027 | WWW: http://the.addict.de/ | | Ich bin das Internet. Sowahr ich Gott helfe. | | Eine gewerbliche Nutzung aller enthaltenen Adressen ist nicht gestattet! |