Pre FreeBSD8.2-RC3 krpc fix

This patch should be applied to any FreeBSD8.n kernel that pre-dates FreeBSD8.2-RC3 if client side NFS is being used. It fixes a problem where a bcopy() assumed, sometimes erroneously, that there were 4 bytes of data in the first mbuf. It also replaces the use of m_pullup() with m_copydata(), since m_pullup() can fail for reasons other than not enough data in the list:

	http://people.freebsd.org/~rmacklem/krpc.patch

FreeBSD8.n and 9.0 fixes

These patches should be applied to all FreeBSD8.n and the FreeBSD9.0 release kernel.

This patch fixes a problem in the new NFS server that was exposed by recent name caching changes, where the server would intermittently reply ENOENT to a Lookup. Although I only observed the problem over NFSv4 mounts, the fix is not NFSv4 specific, since the problem was that ni_topdir was not initialized.

	http://people.freebsd.org/~rmacklem/nfsd-enoent.patch

These two patches fix new NFS server cases where there was a slight chance that a wakeup() would get lost and an nfsd thread would sleep to 10sec. I have no idea if this ever happens in practice. Without the first one, it is also possible to get a panic if "options INVARIANTS" is specified.

	http://people.freebsd.org/~rmacklem/nfsd-tsleep.patch
	http://people.freebsd.org/~rmacklem/nfsd-tsleep2.patch

This patch fixes the NFSv4 server so that a Setattr of an ACL works for exported ZFS volumes.

	http://people.freebsd.org/~rmacklem/nfsd-zfs-acl.patch

This patch fixes the old and new NFS clients so that they do timeouts for UDP mounts correctly. Without this patch, retried RPCs will use a different xid and miss a server's DRC. If UDP mounts are used without this patch, the "timeout=N" mount option should be used with N >= 40.

	http://people.freebsd.org/~rmacklem/udp-timer.patch

This patch fixes handling of credentials for NFSv4 in the new NFS client.

	http://people.freebsd.org/~rmacklem/nfsv4-cred.patch

This patch fixes handling of credentials for system operations in the new NFS client. System operations are done for NFSv4 and also the NFSv3 Statfs RPC when mounted against non-FreeBSD servers (such as Linux ones) that don't put post op attributes in the Statfs RPC reply.

	http://people.freebsd.org/~rmacklem/authcred.patch

FreeBSD8.0 fixes

The FreeBSD8.0 fixes are all in FreeBSD8.1. If you need the patches for a FreeBSD8.0 system, they are here:

	http://people.freebsd.org/~rmacklem/freebsd8.0-patches

FreeBSD8.1 fixes

This patch fixes the regular NFS server so that it doesn't get into an infinite loop in the DRC code under certain circumstances.

	http://people.freebsd.org/~rmacklem/freebsd8.1-patches/replay.patch

This patch fixes a problem for the experimental NFSv4 server when exporting ZFS volumes, where two different file handles were erroneously compared the same, due to the difference being in the fid_reserved field of the generic "struct fid".

	http://people.freebsd.org/~rmacklem/freebsd8.1-patches/nfsdport.patch

This patch fixes the experimental NFSv4 server when local locking is enabled (vfs.newnfs.enable_locallocks=1, which is not the default).

	http://people.freebsd.org/~rmacklem/freebsd8.1-patches/nfsv4server-locallocks.patch

This patch disables the experimental NFSv4 server from attempting to connect to a client's callback path when vfs.newnfs.issue_delegations=0. This provides a workaround for clients (such a Linux) that advertise a callback path which is blocked, due to a firewall or similar, and then times out waiting for the server to reply to an Open, because the server takes too long attempting to connect to the client.

	http://people.freebsd.org/~rmacklem/freebsd8.1-patches/callback-disable.patch

This patch (not yet in head) might fix a race observed when delegations are used with the NFSv4 client. ("nfscbd" daemon running and server has delegations enabled. For the FreeBSD8.1 server, delegations are enabled by setting vfs.newnfs.issue_delegations=1, which is not the default.)

	http://people.freebsd.org/~rmacklem/freebsd8.1-patches/nfsv4client-delegret.patch

Packrat patches

There are patches for FreeBSD-current (post-FreeBSD8.1) that add something I call Packrats. Packrats are kernel threads that cache entire small files in a client's local disk when an NFSv4 server issues a delegation to the client. The current patches do not know how to recover from client or server crashes and are meant to be experimented with only.

The packrats do nothing unless you are using an NFSv4 mount with delegations enabled.

There are two patches. One for the kernel and one for nfscbd. Once the patches are applied and new kernel and nfscbd binaries built and installed, start nfscbd with the -C option specifying a local disk directory for caching. For example:

	# nfscbd -C /sub1/packrat
where /sub1/packrat is a directory on the client's local disk to be used for caching.

The patches are at:

	http://people.freebsd.org/~rmacklem/packrat-patches

RPCSEC_GSS patch for host based initiator credentials

This patch can be applied to FreeBSD8.1/Current to add initiator (client side) host based (in the default keytab file) support for Kerberized NFS. See

	http://code.google.com/p/macnfsv4/wiki/FreeBSD8KerberizedNFSSetup
for more information on setting this up.

The patch is at:

	For FreeBSD9: http://people.freebsd.org/~rmacklem/rpcsec_gss-9.patch
	For FreeBSD8: http://people.freebsd.org/~rmacklem/rpcsec_gss-8.patch