Age | Commit message (Collapse) | Author |
|
hand editing to make comments line up correctly. Another pass is forthcoming that handles the cases that could not be done automatically.
|
|
millert@ ok
|
|
- 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 "EXTRANEOUS HARD LINK TO DIRECTORY" error (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().
From NetBSD via FreeBSD.
- modify propagate() so it be able to start from any point in the tree.
- minor tweaks to get more generality in state propagation.
In other words fsck doesn't leave unremovable directories anymore.
costa@ ok.
|
|
We had this in the tree 1997, but it went away because it was too close to
release.
Ok: csapuntz@
(as a size note: It's really good to test fsck when you are torture testing
the filesystems)
|
|
|
|
|
|
|
|
The following small diff fixes the annoying fsck bug that causes it to
need to be run twice to end up with correct reference counts for inodes
for directories that had subdirectories relocated into the lost+found
directory.
I found the need to rerun *extremely* annoying. This fix causes the
count to be correctly adjusted later in pass 4 by correctly stating
the parent reference count.
Note that the parent reference count is incremented when the directory
entry is made (for ".."), but is not really there in the case of a
directory that does not make an entry in its parent dir.
This can be tested by waiting for the inode sync after cd'ing from a
shell into a test fs. Then you "mkdir xxx yyy zzz", wait a second,
and hit the machine reset button.
|
|
|
|
|
|
|