SYS V - What is Inode 1 ?

John F Haugh II jfh at rpp386.cactus.org
Tue Jan 29 23:53:16 AEST 1991


In article <120447 at uunet.UU.NET> rick at uunet.uu.net (Rick Adams) quotes a
letter from Dennis Ritchie to Guy Harris:
>Incidentally, years later I finally wrote a simple program that
>hid bad blocks.  It doesn't use inode 1, though; you hand it
>the name of an existing, empty file and a list of blocks, and
>it fiddles the inode of the named file to put the blocks in it.
>Now we tend to use disks with ECC and automatic revectoring,
>but it still gets dusted off once in a while.

I did something like this as part of a senior year O/S class.  The
approach was fairly simple.  It took a list of blocks on stdin, and
put those blocks in inode 1 (or 3?  I forget ...) as direct blocks.
If you had more than 10, it found a free block out of the super
block, and made it an indirect block.  It would then store up to
NINDIR bad block numbers in that block.  Regrettably it can't be
posted as it used code from the kernel as a template (nor do I have
it any longer, because it got left behind for just that reason.)

The reason for this was that System III on a PDP-11 did not appear
to support the flakey RL02 packs UNO had.  I believe that the RK07
disk driver did, but that RL02's were just SOL.
-- 
John F. Haugh II                             UUCP: ...!cs.utexas.edu!rpp386!jfh
Ma Bell: (512) 832-8832                           Domain: jfh at rpp386.cactus.org
"13 of 17 valedictorians in Boston High Schools last spring were immigrants
 or children of immigrants"   -- US News and World Report, May 15, 1990



More information about the Comp.unix.internals mailing list