Go to file
Kirk McKusick e268f54cb4 Background:
When renaming a directory it passes through several intermediate
states. First its new name will be created causing it to have two
names (from possibly different parents). Next, if it has different
parents, its value of ".." will be changed from pointing to the old
parent to pointing to the new parent. Concurrently, its old name
will be removed bringing it back into a consistent state. When fsck
encounters an extra name for a directory, it offers to remove the
"extraneous hard link"; when it finds that the names have been
changed but the update to ".." has not happened, it offers to rewrite
".." to point at the correct parent. Both of these changes were
considered unexpected so would cause fsck in preen mode or fsck in
background mode to fail with the need to run fsck manually to fix
these problems. Fsck running in preen mode or background mode now
corrects these expected inconsistencies that arise during directory
rename. The functionality added with this update is used by fsck
running in background mode to make these fixes.

Solution:

This update adds three new fsck sysctl commands to support background
fsck in correcting expected inconsistencies that arise from incomplete
directory rename operations. They are:

setcwd(dirinode) - set the current directory to dirinode in the
    filesystem associated with the snapshot.
setdotdot(oldvalue, newvalue) - Verify that the inode number for ".."
    in the current directory is oldvalue then change it to newvalue.
unlink(nameptr, oldvalue) - Verify that the inode number associated
    with nameptr in the current directory is oldvalue then unlink it.

As with all other fsck sysctls, these new ones may only be used by
processes with appropriate priviledge.

Reported by:    	jeff
Security issues:	rwatson
2010-01-11 20:44:05 +00:00
bin Committed the wrong version in r201484. This time really fix the "-t" 2010-01-04 10:50:17 +00:00
cddl Apply OpenSolaris revision 8012 which brings our zpool to version 14, 2009-12-28 22:15:11 +00:00
contrib Don't include <utmp.h> when using <utmpx.h>. 2010-01-11 16:27:56 +00:00
crypto The size of credential messages is limited by CMGROUP_MAX rather than 2010-01-03 20:45:49 +00:00
etc Properly make the end key work again for TERM=xterm. 2010-01-10 21:41:37 +00:00
games For the now-infamous Rumsfeld quote: 2010-01-07 23:30:10 +00:00
gnu Merge r195030 from project/mips into head by hand: 2010-01-08 23:11:23 +00:00
include Move scandir(3) and alphasort(3) into XSI namespace. 2010-01-05 20:17:13 +00:00
kerberos5 Fix a typo. 2010-01-09 18:53:03 +00:00
lib Reset variable fields in case the transfer is opened again 2010-01-10 19:18:49 +00:00
libexec Make WARNS=6 the default for libexec/. 2010-01-02 09:50:19 +00:00
release sk(4), stge(4) and vge(4) should work on all architectures, snd_t4dwave(4) 2010-01-08 20:38:41 +00:00
rescue
sbin This update utilizes new fsck sysctl commands that allow fsck running 2010-01-11 20:05:38 +00:00
secure Build lib/ with WARNS=6 by default. 2010-01-02 09:58:07 +00:00
share Properly make the end key work again for TERM=xterm. 2010-01-10 21:41:37 +00:00
sys Background: 2010-01-11 20:44:05 +00:00
tools Update files to remove when MK_BLUETOOTH=no. 2010-01-09 19:52:42 +00:00
usr.bin Fix the previous commit (still not used to svn vs. cvs). Use the 2010-01-11 09:16:42 +00:00
usr.sbin Print error messages to stderr. 2010-01-10 19:21:23 +00:00
COPYRIGHT Happy New Year 2010! :-) 2009-12-31 10:00:37 +00:00
LOCKS
MAINTAINERS Removing pre-commit review on isp(4). It's time to let people have their 2009-12-30 14:41:02 +00:00
Makefile Rather than using an extra variable, only call uname if really needed and 2010-01-11 17:58:15 +00:00
Makefile.inc1 Disable K&R style function definitions for WARNS=6. 2009-12-31 00:07:26 +00:00
ObsoleteFiles.inc Use umtx to implement process sharable semaphore, to make this work, 2010-01-05 02:37:59 +00:00
README
UPDATING Introduce the new kernel thread called "deadlock resolver". 2010-01-09 01:46:38 +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 ``world''
target should only be used in cases where the source tree has not
changed from the currently running version.  See:
http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/makeworld.html
for more information, including setting make(1) variables.

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.

rescue		Build system for statically linked /rescue utilities.

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