freebsd-skq/sys/compat/linux
mckusick 0cddeb2cb4 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
..
linux_emul.c Remove support for FUTEX_REQUEUE operation. 2009-04-19 13:48:42 +00:00
linux_emul.h Remove support for FUTEX_REQUEUE operation. 2009-04-19 13:48:42 +00:00
linux_file.c Background: 2010-01-11 20:44:05 +00:00
linux_file.h Implement the linux syscalls 2008-04-08 09:45:49 +00:00
linux_futex.c Remove extraneous semicolons, no functional changes. 2010-01-07 21:01:37 +00:00
linux_futex.h Move extern variable definitions to the header file. 2009-05-02 10:06:49 +00:00
linux_getcwd.c Move "options MAC" from opt_mac.h to opt_global.h, as it's now in GENERIC 2009-06-05 14:55:22 +00:00
linux_ioctl.c This is v4l support for the linuxulator. This allows to access FreeBSD 2009-12-04 21:06:54 +00:00
linux_ioctl.h This is v4l support for the linuxulator. This allows to access FreeBSD 2009-12-04 21:06:54 +00:00
linux_ipc.c Fix typo in kernel message. The fix is based upon the patch in the PR. 2009-11-05 07:37:48 +00:00
linux_ipc.h MFP4 (110956): 2006-12-21 13:11:06 +00:00
linux_mib.c Some jail parameters (in particular, "ip4" and "ip6" for IP address 2009-07-25 14:48:57 +00:00
linux_mib.h Do not export AT_CLKTCK when emulating Linux kernel prior 2009-05-10 18:43:43 +00:00
linux_misc.c kern_select(9) copies fd_set in and out of userspace in quantities of 2009-09-09 20:59:01 +00:00
linux_misc.h Rework r189362, r191883. 2009-05-10 18:16:07 +00:00
linux_signal.c Signal 0 is used to check the permission for current process to signal 2009-12-18 14:27:18 +00:00
linux_signal.h Correctly fill siginfo for the signals delivered by linux tkill/tgkill. 2008-10-19 10:02:26 +00:00
linux_socket.c Unconditionally call the setsockopt for IPV6_V6ONLY for v6 linux sockets 2009-10-25 09:58:56 +00:00
linux_socket.h Implement MSG_CMSG_CLOEXEC flag for linux_recvmsg(). 2009-05-18 04:07:46 +00:00
linux_stats.c Move "options MAC" from opt_mac.h to opt_global.h, as it's now in GENERIC 2009-06-05 14:55:22 +00:00
linux_sysctl.c Unbreak COMPAT_LINUX32 option support on amd64. 2006-03-19 11:10:33 +00:00
linux_sysproto.h
linux_time.c MFP4: 109655 2006-12-20 20:17:35 +00:00
linux_uid16.c Rework the credential code to support larger values of NGROUPS and 2009-06-19 17:10:35 +00:00
linux_util.c Retire the MALLOC and FREE macros. They are an abomination unto style(9). 2008-10-23 15:53:51 +00:00
linux_util.h Add preliminary KTR(9) support to the linux emulation layer. 2009-05-07 10:01:05 +00:00
linux_videodev_compat.h This is v4l support for the linuxulator. This allows to access FreeBSD 2009-12-04 21:06:54 +00:00
linux_videodev.h This is v4l support for the linuxulator. This allows to access FreeBSD 2009-12-04 21:06:54 +00:00