freebsd-dev/sys/compat
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
..
freebsd32 Revert 200606. 2009-12-16 21:53:56 +00:00
ia32 Make sure that the primary native brandinfo always gets added 2009-10-03 11:57:21 +00:00
linprocfs Fix a few panics in linuxulator + VIMAGE due to curvnet not being set. 2009-08-28 22:51:07 +00:00
linsysfs
linux Background: 2010-01-11 20:44:05 +00:00
ndis Revert a functional change that snuck in. 2009-11-02 19:13:12 +00:00
netbsd
svr4 Include <sys/tty.h> instead of <sys/termios.h>. 2009-11-28 16:30:06 +00:00
x86bios Add two new debugging tunables for x86bios instead of abusing bootverbose, 2009-12-15 22:44:28 +00:00