]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
If the lost+found directory is created by fsck, it will do a cacheino()
authorKirk McKusick <mckusick@FreeBSD.org>
Mon, 24 Jul 2000 19:50:20 +0000 (19:50 +0000)
committerKirk McKusick <mckusick@FreeBSD.org>
Mon, 24 Jul 2000 19:50:20 +0000 (19:50 +0000)
commit91ea161570a408dc49c28f08773518457839af0a
tree1dce95bcca74fd1bfdbe275d23db85ead4f4aab9
parent2eaaa4dea89391d734d3f66f09e5979cd5808943
If the lost+found directory is created by fsck, it will do a cacheino()
which sets the inoinfo's i_parent and i_dotdot to 0, but they never get
set to ROOTINO. This means that propagate will never find lost+found and
its descendents, subdirectories will remain DSTATE (instead of DFOUND)
even though they *are* correctly linked in, and pass4.c will try to
clear them unsuccessfully, thinking that there is no link count from the
DSTATE directory's parent. The result is that you need to run fsck twice
and get link count increasing errors (which are unexpected and fatal
when running in preen mode). The fix is to set i_parent and i_dotdot to
"parent" after the second cacheino() call in dir.c:allocdir().

Obtained from: "Ethan Solomita" <ethan@geocast.com> (of the NetBSD Project)
sbin/fsck/dir.c
sbin/fsck_ffs/dir.c
sbin/fsck_ifs/dir.c