From owner-freebsd-fs Mon Oct 29 5:35: 0 2001 Delivered-To: freebsd-fs@freebsd.org Received: from mout1.freenet.de (mout1.freenet.de [194.97.50.132]) by hub.freebsd.org (Postfix) with ESMTP id 7E95637B405 for ; Mon, 29 Oct 2001 05:34:57 -0800 (PST) Received: from [194.97.50.144] (helo=mx1.freenet.de) by mout1.freenet.de with esmtp (Exim 3.33 #1) id 15yCZ4-0001WP-00 for fs@freebsd.org; Mon, 29 Oct 2001 14:34:54 +0100 Received: from ae18f.pppool.de ([213.6.225.143] helo=Magelan.Leidinger.net) by mx1.freenet.de with esmtp (Exim 3.33 #3) id 15yCZ2-0001v7-00 for fs@freebsd.org; Mon, 29 Oct 2001 14:34:53 +0100 Received: from Leidinger.net (netchild@localhost [127.0.0.1]) by Magelan.Leidinger.net (8.11.6/8.11.6) with ESMTP id f9TDSGE04238 for ; Mon, 29 Oct 2001 14:28:17 +0100 (CET) (envelope-from netchild@Leidinger.net) Message-Id: <200110291328.f9TDSGE04238@Magelan.Leidinger.net> Date: Mon, 29 Oct 2001 14:28:15 +0100 (CET) From: Alexander Leidinger Subject: physical block no -> name of file (FFS)? To: fs@freebsd.org MIME-Version: 1.0 Content-Type: TEXT/plain; charset=us-ascii Sender: owner-freebsd-fs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org Hi, [Please keep me in the CC] I've a bad block on a harddisk and want to know the name of the file which the bad block is a part of (to replace the file from a backup after writting zeros to the block to remap the block). At http://www.leidinger.net/FreeBSD/b2i.c I've a quick hack which is able to find the slice and partition which contains the bad block, but I don't know what to do now. The idea I have is: - find the dinode which has a relationship to the bad block - find the corresponding directory entry - print the name But I don't know enough about the ffs to do this, what FM should I read to be able to do this (online or basesystem documentation prefered over dead wood docs)? My main problem at the moment is: how does the on disk layout look like? I tried a little bit in b2i.c (state_superblock & state_dinode), but I think this is wrong. Bye, Alexander. -- Loose bits sink chips. http://www.Leidinger.net Alexander @ Leidinger.net GPG fingerprint = C518 BC70 E67F 143F BE91 3365 79E2 9C60 B006 3FE7 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-fs" in the body of the message