Subject: CVS commit: src/sys/ufs/ffs
To: None <source-changes@NetBSD.org>
From: Matthias Drochner <drochner@netbsd.org>
List: source-changes
Date: 10/24/2006 19:36:26
Module Name: src
Committed By: drochner
Date: Tue Oct 24 19:36:26 UTC 2006
Modified Files:
src/sys/ufs/ffs: ffs_softdep.c
Log Message:
import a fix from FreeBSD (rev.1.185):
After a rmdir()ed directory has been truncated, force an update of
the directory's inode after queuing the dirrem that will decrement
the parent directory's link count. This will force the update of
the parent directory's actual link to actually be scheduled. Without
this change the parent directory's actual link count would not be
updated until ufs_inactive() cleared the inode of the newly removed
directory, which might be deferred indefinitely. ufs_inactive()
will not be called as long as any process holds a reference to the
removed directory, and ufs_inactive() will not clear the inode if
the link count is non-zero, which could be the result of an earlier
system crash.
[plus description about problems woth background fsck solved
by this; irrelevant to NetBSD]
For me, the good effect is at least that I'm getting less filesystem
inconsistencies after a crash.
Approved by christos quite a while ago.
To generate a diff of this commit:
cvs rdiff -r1.79 -r1.80 src/sys/ufs/ffs/ffs_softdep.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.