Date: Mon, 29 Oct 2001 14:28:15 +0100 (CET) From: Alexander Leidinger <Alexander@Leidinger.net> To: fs@freebsd.org Subject: physical block no -> name of file (FFS)? Message-ID: <200110291328.f9TDSGE04238@Magelan.Leidinger.net>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200110291328.f9TDSGE04238>