readdir and d_ino set to 0

Eric Blake ebb9@byu.net
Sat Sep 5 16:14:00 GMT 2009


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

According to Eric Norum on 9/3/2009 7:00 PM:
> If I recall my Unix V7 code correctly, I think that inode 0 was reserved
> for holding a list of bad blocks.  Of course if your disk had a bad
> block that was *in* the inode table you were pretty much out of luck.....

Also, modern-day BSD union mounts read all the entries from several layers
of directories, sort them, then discard duplicate names by changing d_ino
to 0.  In other words, there are still live systems where readdir returns
such dead entries.

- --
Don't work too hard, make some time for fun as well!

Eric Blake             ebb9@byu.net
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkqgbMIACgkQ84KuGfSFAYCFJwCfd4S4S9KKe/x4Tdll8esmWQ1B
qFQAoMItnsb9TxhD0UXDsLGuxTq82Ogb
=F4ZE
-----END PGP SIGNATURE-----



More information about the Newlib mailing list