freebsd kernel with SKQ
Go to file
Don Lewis 445193b887 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.

If a background fsck is run before the update of the parent directory's
actual link count has been performed, or at least scheduled by
putting the dirrem on the leaf directory's inodedep id_bufwait list,
fsck will corrupt the file system by decrementing the parent
directory's effective link count, which was previously correct
because it already took the removal of the leaf directory into
account, and setting the actual link count to the same value as the
effective link count after the dangling, removed, leaf directory
has been removed.  This happens because fsck acts based on the
actual link count, which will be too high when fsck creates the
file system snapshot that it references.

This change has the fortunate side effect of more quickly cleaning
up the large number dirrem structures that linger for an extended
time after the removal of a large directory tree.  It also fixes a
potential problem with the shutdown of the syncer thread timing out
if the system is rebooted immediately after removing a large directory
tree.

Submitted by:	tegge
MFC after:	3 days
2005-09-29 21:50:26 +00:00
bin Handle the case where the -P flag is specified for a read-only file 2005-09-29 20:40:29 +00:00
contrib Redirect bridge(4) to if_bridge(4). These should have pointed to if_bridge 2005-09-28 08:11:15 +00:00
crypto Regenerate 2005-09-03 07:08:51 +00:00
etc Be less IPv4 centric. When checking if the interface is already 2005-09-28 19:59:18 +00:00
games Nuke duplicates found via fuzzy logic: 2005-09-28 18:18:29 +00:00
gnu Unbreak - remove leftover reference to pcb_rflags. 2005-09-28 07:40:27 +00:00
include Back out 1.247. On ia64 <osreldate.h> is included from assembler source, 2005-09-14 09:01:06 +00:00
kerberos5 Bump the shared library version number of all libraries that have not 2005-07-22 17:19:05 +00:00
lib Commenting out WARNS actually brought it up to 4. 2005-09-28 14:36:16 +00:00
libexec Clean out the leftovers from the i386_set_gsbase() TLS conversion. 2005-06-29 23:15:36 +00:00
release Add SHA256 checksums to the release build. 2005-09-28 12:39:00 +00:00
rescue Respect the YES_HESIOD build variable. 2005-08-06 16:53:55 +00:00
sbin err() -> errx() where appropriate. 2005-09-29 13:09:04 +00:00
secure Update for OpenSSH 4.2p1. 2005-09-03 07:10:33 +00:00
share Dcoument typical debugging options, plus the new CIS device for pccard. 2005-09-29 16:45:53 +00:00
sys After a rmdir()ed directory has been truncated, force an update of 2005-09-29 21:50:26 +00:00
tools Fix a bug in disk geometry calculation. 2005-09-29 16:06:59 +00:00
usr.bin Oops, revert last commit (the manpage is still built in objdir). 2005-09-28 07:54:18 +00:00
usr.sbin Don't build pccardd anymore. 2005-09-29 21:32:57 +00:00
COPYRIGHT Complete 2005 transition. 2005-01-01 07:29:20 +00:00
LOCKS Document the previously existing RELENG_[45]_* security branch locks. 2005-06-02 22:57:30 +00:00
MAINTAINERS Add myself as a maintainer of Bluetooth code 2005-08-25 17:14:39 +00:00
Makefile Add delete-old and delete-old-libs targets: 2005-07-23 14:23:30 +00:00
Makefile.inc1 Fix a couple of typos 2005-08-23 07:58:55 +00:00
ObsoleteFiles.inc Do not commit before the first cup of coffee. Other entries don't have a 2005-09-28 09:19:17 +00:00
README
UPDATING Remove bridge(4) from the tree. if_bridge(4) is a full functional 2005-09-27 18:10:43 +00:00

This is the top level of the FreeBSD source directory.  This file
was last revised on:
$FreeBSD$

For copyright information, please see the file COPYRIGHT in this
directory (additional copyright information also exists for some
sources in this tree - please see the specific source directories for
more information).

The Makefile in this directory supports a number of targets for
building components (or all) of the FreeBSD source tree, the most
commonly used one being ``world'', which rebuilds and installs
everything in the FreeBSD system from the source tree except the
kernel, the kernel-modules and the contents of /etc.  The
``buildkernel'' and ``installkernel'' targets build and install
the kernel and the modules (see below).  Please see the top of
the Makefile in this directory for more information on the
standard build targets and compile-time flags.

Building a kernel is a somewhat more involved process, documentation
for which can be found at:
   http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig.html
And in the config(8) man page.
Note: If you want to build and install the kernel with the
``buildkernel'' and ``installkernel'' targets, you might need to build
world before.  More information is available in the handbook.

The sample kernel configuration files reside in the sys/<arch>/conf
sub-directory (assuming that you've installed the kernel sources), the
file named GENERIC being the one used to build your initial installation
kernel.  The file NOTES contains entries and documentation for all possible
devices, not just those commonly used.  It is the successor of the ancient
LINT file, but in contrast to LINT, it is not buildable as a kernel but a
pure reference and documentation file.


Source Roadmap:
---------------
bin		System/user commands.

contrib		Packages contributed by 3rd parties.

crypto		Cryptography stuff (see crypto/README).

etc		Template files for /etc.

games		Amusements.

gnu		Various commands and libraries under the GNU Public License.
		Please see gnu/COPYING* for more information.

include		System include files.

kerberos5	Kerberos5 (Heimdal) package.

lib		System libraries.

libexec		System daemons.

release		Release building Makefile & associated tools.

sbin		System commands.

secure		Cryptographic libraries and commands.

share		Shared resources.

sys		Kernel sources.

tools		Utilities for regression testing and miscellaneous tasks.

usr.bin		User commands.

usr.sbin	System administration commands.


For information on synchronizing your source tree with one or more of
the FreeBSD Project's development branches, please see:

  http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/synching.html