NFS client patches for Linux 2.6.28-rc9

The following set of patches fix known issues with the 2.6.28-rc9 NFS client code, and significantly enhance the support for NFSv4.

linux-2.6.28-001-fix_socket_close.dif:

From: Trond Myklebust <Trond.Myklebust@netapp.com>

Date: Sun, 21 Dec 2008 12:20:17 -0500

SUNRPC: Ensure the server closes sockets in a timely fashion

We want to ensure that connected sockets close down the connection when we set XPT_CLOSE, so that we don't keep it hanging while cleaning up all the stuff that is keeping a reference to the socket.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>

linux-2.6.28-002-fix_svc_delete_xprt.dif:

From: Trond Myklebust <Trond.Myklebust@netapp.com>

Date: Sun, 21 Dec 2008 12:20:18 -0500

SUNRPC: We only need to call svc_delete_xprt() once...

Use XPT_DEAD to ensure that we only call xpo_detach & friends once.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>

linux-2.6.28-003-fix_svc_xprt_enqueue.dif:

From: Trond Myklebust <Trond.Myklebust@netapp.com>

Date: Sun, 21 Dec 2008 12:20:18 -0500

SUNRPC: svc_xprt_enqueue should not refuse to enqueue 'XPT_DEAD' transports

Aside from being racy (there is nothing preventing someone setting XPT_DEAD after the test in svc_xprt_enqueue, and before XPT_BUSY is set), it is wrong to assume that transports which have called svc_delete_xprt() might not need to be re-enqueued.

See the list of deferred requests, which is currently never going to be cleared if the revisit call happens after svc_delete_xprt(). In this case, the deferred request will currently keep a reference to the transport forever.

The fix should be to allow dead transports to be enqueued in order to clear the deferred requests, then change the order of processing in svc_recv() so that we pick up deferred requests before we do the XPT_CLOSE processing.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>

linux-2.6.28-004-add_tcp_linger2.dif:

From: Trond Myklebust <Trond.Myklebust@netapp.com>

Date: Sun, 21 Dec 2008 12:20:19 -0500

SUNRPC: Add the equivalent of the linger2 timeout to RPC sockets

This avoids us getting stuck in the TCP_FIN_WAIT2 state forever.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>

linux-2.6.28-005-nfs_fix_readahead.dif:

From: Wu Fengguang <fengguang.wu@intel.com>

Date: Sun, 21 Dec 2008 12:20:20 -0500

nfs: remove redundant tests on reading new pages

aops->readpages() and its NFS helper readpage_async_filler() will only be called to do readahead I/O for newly allocated pages. So it's not necessary to test for the always 0 dirty/uptodate page flags.

The removal of nfs_wb_page() call also fixes a readahead bug: the NFS readahead has been synchronous since 2.6.23, because that call will clear PG_readahead, which is the reminder for asynchronous readahead.

More background: the PG_readahead page flag is shared with PG_reclaim, one for read path and the other for write path. clear_page_dirty_for_io() unconditionally clears PG_readahead to prevent possible readahead residuals, assuming itself to be always called in the write path. However, NFS is one and the only exception in that it _always_ calls clear_page_dirty_for_io() in the read path, i.e. for readpages()/readpage().

Cc: Trond Myklebust <Trond.Myklebust@netapp.com>

Signed-off-by: Wu Fengguang <wfg@linux.intel.com>

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>

linux-2.6.28-006-remove_last_bkl.dif:

From: Trond Myklebust <Trond.Myklebust@netapp.com>

Date: Sun, 21 Dec 2008 12:20:21 -0500

SUNRPC: Remove the last remnant of the BKL...

Somehow, this escaped the previous purge. There should be no need to keep any extra locks in the XDR callbacks.

The NFS client XDR code only writes into private objects, whereas all reads of shared objects are confined to fields that do not change, such as filehandles...

Ditto for lockd, the NFSv2/v3 client mount code, and rpcbind.

The nfsd XDR code may require the BKL, but since it does a synchronous RPC call from a thread that already holds the lock, that issue is moot.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>

linux-2.6.28-007-xdr_should_be_export_symbol_gpl.dif:

From: Trond Myklebust <Trond.Myklebust@netapp.com>

Date: Sun, 21 Dec 2008 12:20:22 -0500

SUNRPC: Convert the xdr helpers and rpc_pipefs to EXPORT_SYMBOL_GPL

We've never considered the sunrpc code as part of any ABI to be used by out-of-tree modules.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>

linux-2.6.28-008-auth_gss_should_be_export_symbol_gpl.dif:

From: Trond Myklebust <Trond.Myklebust@netapp.com>

Date: Sun, 21 Dec 2008 12:20:22 -0500

SUNRPC: rpcsec_gss modules should not be used by out-of-tree code

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>

linux-2.6.28-009-nfs_common_should_be_export_symbol_gpl.dif:

From: Trond Myklebust <Trond.Myklebust@netapp.com>

Date: Sun, 21 Dec 2008 12:20:24 -0500

SUNRPC: nfsacl_encode/nfsacl_decode should be exported as GPL-only

Again, this has never been intended as a public abi for out-of-tree modules.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>

linux-2.6.28-009-sunrpc_server_should_be_export_symbol_gpl.dif:

From: Trond Myklebust <Trond.Myklebust@netapp.com>

Date: Sun, 21 Dec 2008 12:20:23 -0500

SUNRPC: The sunrpc server code should not be used by out-of-tree modules

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>

linux-2.6.28-010-lockd_should_be_export_symbol_gpl.dif:

From: Trond Myklebust <Trond.Myklebust@netapp.com>

Date: Sun, 21 Dec 2008 12:20:25 -0500

LOCKD: Make lockd_up() and lockd_down() exported GPL-only

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>

linux-2.6.28-011-convert_reclaimer_to_use_kthread.dif:

From: Jeff Layton <jlayton@redhat.com>

Date: Sun, 21 Dec 2008 12:20:26 -0500

lockd: convert reclaimer thread to kthread interface

My understanding is that there is a push to turn the kernel_thread interface into a non-exported symbol and move all kernel threads to use the kthread API. This patch changes lockd to use kthread_run to spawn the reclaimer thread.

I've made the assumption here that the extra module references taken when we spawn this thread are unnecessary and removed them. I've also added a KERN_ERR printk that pops if the thread can't be spawned to warn the admin that the locks won't be reclaimed.

In the future, it would be nice to be able to notify userspace that locks have been lost (probably by implementing SIGLOST), and adding some good policies about how long we should reattempt to reclaim the locks.

Finally, I removed a comment about memory leaks that I believe is obsolete and added a new one to clarify the result of sending a SIGKILL to the reclaimer thread. As best I can tell, doing so doesn't actually cause a memory leak.

I consider this patch 2.6.29 material.

Signed-off-by: Jeff Layton <jlayton@redhat.com>

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>

linux-2.6.28-012-rename_nfs_path_variable.dif:

From: Chuck Lever <chuck.lever@oracle.com>

Date: Sun, 21 Dec 2008 12:20:26 -0500

NFS: rename nfs_path variable

Clean up: I'm about to move the declaration of nfs_mount into fs/nfs/internal.h and include it in fs/nfs/nfsroot.c. There's a conflicting definition of nfs_path in fs/nfs/internal.h and fs/nfs/nfsroot.c, so rename the private one.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>

linux-2.6.28-013-move_declaration_of_nfs_mount_to_fs_nfs_internal_h.dif:

From: Chuck Lever <chuck.lever@oracle.com>

Date: Sun, 21 Dec 2008 12:20:27 -0500

NFS: Move declaration of nfs_mount() to fs/nfs/internal.h

Clean up: The nfs_mount() function is not to be used outside of the NFS client. Move its public declaration to fs/nfs/internal.h.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>

linux-2.6.28-014-introduce_nfs_mount_info_struct_for_calling_nfs_mount.dif:

From: Chuck Lever <chuck.lever@oracle.com>

Date: Sun, 21 Dec 2008 12:20:28 -0500

NFS: introduce nfs_mount_info struct for calling nfs_mount()

Clean up: convert nfs_mount() to take a single data structure argument to make it simpler to add more arguments.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>

linux-2.6.28-015-expand_flags_passed_to_nfs_create_rpc_client.dif:

From: Chuck Lever <chuck.lever@oracle.com>

Date: Sun, 21 Dec 2008 12:20:29 -0500

NFS: expand flags passed to nfs_create_rpc_client()

The nfs_create_rpc_client() function sets up an RPC client for an NFS mount point. Add an option that allows it to set up an RPC transport from an unprivileged port.

Instead of having nfs_create_rpc_client()'s callers retain local knowledge about how to set up an RPC client, create a couple of flag arguments to control the use of RPC_CLNT_CREATE flags.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>

linux-2.6.28-016-move_nfs_server_flag_initialization.dif:

From: Chuck Lever <chuck.lever@oracle.com>

Date: Sun, 21 Dec 2008 12:20:30 -0500

NFS: move nfs_server flag initialization

Make it possible for the NFSv4 mount set up logic to pass mount option flags down the stack to nfs_create_rpc_client().

This is immediately useful if we want NFS mount options to modulate settings of the underlying RPC transport, but it may be useful at some later point if other parts of the NFSv4 mount initialization logic want to know what the mount options are.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>

linux-2.6.28-017-add_no_resvport_mount_option.dif:

From: Chuck Lever <chuck.lever@oracle.com>

Date: Sun, 21 Dec 2008 12:20:30 -0500

NFS: add "[no]resvport" mount option

The standard default security setting for NFS is AUTH_SYS. An NFS client connects to NFS servers via a privileged source port and a fixed standard destination port (2049). The client sends raw uid and gid numbers to identify users making NFS requests, and the server assumes an appropriate authority on the client has vetted these values because the source port is privileged.

On Linux, by default in-kernel RPC services use a privileged port in the range between 650 and 1023 to avoid using source ports of well- known IP services. Using such a small range limits the number of NFS mount points and the number of unique NFS servers to which a client can connect concurrently.

An NFS client can use unprivileged source ports to expand the range of source port numbers, allowing more concurrent server connections and more NFS mount points. Servers must explicitly allow NFS connections from unprivileged ports for this to work.

In the past, bumping the value of the sunrpc.max_resvport sysctl on the client would permit the NFS client to use unprivileged ports. Bumping this setting also changes the maximum port number used by other in-kernel RPC services, some of which still required a port number less than 1023.

This is exacerbated by the way source port numbers are chosen by the Linux RPC client, which starts at the top of the range and works downwards. It means that bumping the maximum means all RPC services requesting a source port will likely get an unprivileged port instead of a privileged one.

Changing this setting effects all NFS mount points on a client. A sysadmin could not selectively choose which mount points would use non-privileged ports and which could not.

Lastly, this mechanism of expanding the limit on the number of NFS mount points was entirely undocumented.

To address the need for the NFS client to use a large range of source ports without interfering with the activity of other in-kernel RPC services, we introduce a new NFS mount option. This option explicitly tells only the NFS client to use a non-privileged source port when communicating with the NFS server for one specific mount point.

This new mount option is called "resvport," like the similar NFS mount option on FreeBSD and Mac OS X. A sister patch for nfs-utils will be submitted that documents this new option in nfs(5).

The default setting for this new mount option requires the NFS client to use a privileged port, as before. Explicitly specifying the "noresvport" mount option allows the NFS client to use an unprivileged source port for this mount point when connecting to the NFS server port.

This mount option is supported only for text-based NFS mounts.

[ Sidebar: it is widely known that security mechanisms based on the use of privileged source ports are ineffective. However, the NFS client can combine the use of unprivileged ports with the use of secure authentication mechanisms, such as Kerberos. This allows a large number of connections and mount points while ensuring a useful level of security.

Eventually we may change the default setting for this option depending on the security flavor used for the mount. For example, if the mount is using only AUTH_SYS, then the default setting will be "resvport;" if the mount is using a strong security flavor such as krb5, the default setting will be "noresvport." ]

Signed-off-by: Chuck Lever <chuck.lever@oracle.com> [Trond.Myklebust@netapp.com: Fixed a bug whereby nfs4_init_client() was being called with incorrect arguments.]

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>

linux-2.6.28-018-no_resvport_mount_option_changes_mountd_client_too.dif:

From: Chuck Lever <chuck.lever@oracle.com>

Date: Sun, 21 Dec 2008 12:20:31 -0500

NFS: "[no]resvport" mount option changes mountd client too

If the admin has specified the "noresvport" option for an NFS mount point, the kernel's NFS client uses an unprivileged source port for the main NFS transport. The kernel's mountd client should use an unprivileged port in this case as well.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>

linux-2.6.28-019-allow_lockd_requests_from_an_unprivileged_port.dif:

From: Chuck Lever <chuck.lever@oracle.com>

Date: Sun, 21 Dec 2008 12:20:32 -0500

NLM: allow lockd requests from an unprivileged port

If the admin has specified the "noresvport" option for an NFS mount point, the kernel's NFS client uses an unprivileged source port for the main NFS transport. The kernel's lockd client should use an unprivileged port in this case as well.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>

linux-2.6.28-020-fix_up_delegation_stateid_race.dif:

From: Trond Myklebust <Trond.Myklebust@netapp.com>

Date: Sun, 21 Dec 2008 12:20:33 -0500

NFSv4: Fix up another delegation related race

When we can update_open_stateid(), we need to be certain that we don't race with a delegation return. While we could do this by grabbing the nfs_client->cl_lock, a dedicated spin lock in the delegation structure will scale better.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>

linux-2.6.28-021-fix_up_delegation_inode_dereferencing.dif:

From: Trond Myklebust <Trond.Myklebust@netapp.com>

Date: Sun, 21 Dec 2008 12:20:34 -0500

NFSv4: Fix up the dereferencing of delegation->inode

Without an extra lock, we cannot just assume that the delegation->inode is valid when we're traversing the rcu-protected nfs_client lists. Use the delegation->lock to ensure that it is truly valid.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>

linux-2.6.28-022-make_delegation_flags_atomic.dif:

From: Trond Myklebust <Trond.Myklebust@netapp.com>

Date: Sun, 21 Dec 2008 12:20:34 -0500

NFS: Use atomic bitops when changing struct nfs_delegation->flags

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>

linux-2.6.28-023-cleanup_nfsv4_reclaimer.dif:

From: Trond Myklebust <Trond.Myklebust@netapp.com>

Date: Sun, 21 Dec 2008 12:20:35 -0500

NFSv4: Clean up for the state loss reclaimer

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>

linux-2.6.28-024-protect_get_renew_cred.dif:

From: Trond Myklebust <Trond.Myklebust@netapp.com>

Date: Sun, 21 Dec 2008 12:20:36 -0500

NFSv4: Callers to nfs4_get_renew_cred() need to hold nfs_client->cl_lock

Ditto for nfs4_get_setclientid_cred().

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>

linux-2.6.28-025-fix_grace_period_expired_recovery.dif:

From: Trond Myklebust <Trond.Myklebust@netapp.com>

Date: Sun, 21 Dec 2008 12:20:37 -0500

NFSv4: Fix state recovery when the client runs over the grace period

If the client for some reason is not able to recover all its state within the time allotted for the grace period, and the server reboots again, the client is not allowed to recover the state that was 'lost' using reboot recovery.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>

linux-2.6.28-026-dont_check_lease_when_not_needed.dif:

From: Trond Myklebust <Trond.Myklebust@netapp.com>

Date: Sun, 21 Dec 2008 12:20:38 -0500

NFSv4: Remove redundant RENEW calls if we know the lease has expired

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>

linux-2.6.28-027-dont_reboot_when_not_necessary.dif:

From: Trond Myklebust <Trond.Myklebust@netapp.com>

Date: Sun, 21 Dec 2008 12:20:39 -0500

NFSv4: Don't tell server we rebooted when not necessary

Instead of doing a full setclientid, try doing a RENEW call first.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>

linux-2.6.28-028-also_mark_state_owner_for_recovery.dif:

From: Trond Myklebust <Trond.Myklebust@netapp.com>

Date: Sun, 21 Dec 2008 12:20:40 -0500

NFSv4: Add a recovery marking scheme for state owners

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>

linux-2.6.28-029-fix_nfs4_reclaim_open_state_locking.dif:

From: Trond Myklebust <Trond.Myklebust@netapp.com>

Date: Sun, 21 Dec 2008 12:20:40 -0500

NFSv4: Ensure that nfs4_reclaim_open_state() doesn't depend on cl_sem

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>

linux-2.6.28-030-fix_nfs4_wait_clnt_recover.dif:

From: Trond Myklebust <Trond.Myklebust@netapp.com>

Date: Sun, 21 Dec 2008 12:20:41 -0500

NFS: Remove the unnecessary argument to nfs4_wait_clnt_recover()

...and move some code around in order to clear out an unnecessary forward declaration.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>

linux-2.6.28-031-fix_nfs4_unlock_recovery_exclusion.dif:

From: Trond Myklebust <Trond.Myklebust@netapp.com>

Date: Sun, 21 Dec 2008 12:20:42 -0500

NFSv4: Ensure that file unlock requests don't conflict with state recovery

The unlock path is currently failing to take the nfs_client->cl_sem read lock, and hence the recovery path may see locks disappear from underneath it. Also ensure that it takes the nfs_inode->rwsem read lock so that it there is no conflict with delegation recalls.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>

linux-2.6.28-032-remove_cl_sem.dif:

From: Trond Myklebust <Trond.Myklebust@netapp.com>

Date: Sun, 21 Dec 2008 12:20:43 -0500

NFSv4: Remove nfs_client->cl_sem

Now that we're using the flags to indicate state that needs to be recovered, as well as having implemented proper refcounting and spinlocking on the state and open_owners, we can get rid of nfs_client->cl_sem. The only remaining case that was dubious was the file locking, and that case is now covered by the nfsi->rwsem.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>

linux-2.6.28-033-add_recovery_from_bad_stateid.dif:

From: Trond Myklebust <Trond.Myklebust@netapp.com>

Date: Sun, 21 Dec 2008 12:48:12 -0500

NFSv4: Add recovery for individual stateids

NFSv4 defines a number of state errors which the client does not currently handle. Among those we should worry about are: NFS4ERR_ADMIN_REVOKED - the server's administrator revoked our locks and/or delegations. NFS4ERR_BAD_STATEID - the client and server are out of sync, possibly due to a delegation return racing with an OPEN request. NFS4ERR_OPENMODE - the client attempted to do something not sanctioned by the open mode of the stateid. Should normally just occur as a result of a delegation return race.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>

linux-2.6.28-034-allow_multiple_delegreturns.dif:

From: Trond Myklebust <Trond.Myklebust@netapp.com>

Date: Sun, 21 Dec 2008 12:48:41 -0500

NFSv4: Clean up the support for returning multiple delegations

Add a flag to mark delegations as requiring return, then run a garbage collector. In the future, this will allow for more flexible delegation management, where delegations may be marked for return if it turns out that they are not being referenced.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>

linux-2.6.28-035-cleanup_handle_cb_pathdown.dif:

From: Trond Myklebust <Trond.Myklebust@netapp.com>

Date: Sun, 21 Dec 2008 12:48:42 -0500

NFSv4: Clean up NFS4ERR_CB_PATH_DOWN error management...

Add a delegation cleanup phase to the state management loop, and do the NFS4ERR_CB_PATH_DOWN recovery there.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>

linux-2.6.28-036-rename_state_reclaim_thread.dif:

From: Trond Myklebust <Trond.Myklebust@netapp.com>

Date: Sun, 21 Dec 2008 12:48:43 -0500

NFSv4: Rename the state reclaimer thread

It is really a more general purpose state management thread at this point.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>

linux-2.6.28-037-fix_state_recovery_races.dif:

From: Trond Myklebust <Trond.Myklebust@netapp.com>

Date: Sun, 21 Dec 2008 12:48:43 -0500

NFSv4: Don't exit the state management if there are still tasks to do

Fix up a potential race...

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>

linux-2.6.28-038-fix_bad_sequenceid.dif:

From: Trond Myklebust <Trond.Myklebust@netapp.com>

Date: Sun, 21 Dec 2008 12:48:44 -0500

NFSv4: Fix a BAD_SEQUENCEID condition.

We really shouldn't be resetting the sequence ids when doing state expiration recovery, since we don't know if the server still remembers our previous state owners. There are servers out there that do attempt to preserve client state even if the lease has expired. Such a server would only release that state if a conflicting OPEN request occurs.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>

linux-2.6.28-039-clean_up_nfs_expire_all_delegations.dif:

From: Trond Myklebust <Trond.Myklebust@netapp.com>

Date: Sun, 21 Dec 2008 12:48:45 -0500

NFSv4: Clean up nfs_expire_all_delegations()

Let the actual delegreturn stuff be run in the state manager thread rather than allocating a separate kthread.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>

linux-2.6.28-040-clean_up_asynchronous_delegation_return.dif:

From: Trond Myklebust <Trond.Myklebust@netapp.com>

Date: Sun, 21 Dec 2008 12:48:45 -0500

NFSv4: Clean up the asynchronous delegation return

Reuse the state management thread in order to return delegations when we get a callback.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>

linux-2.6.28-041-clean_out_unreferenced_delegations.dif:

From: Trond Myklebust <Trond.Myklebust@netapp.com>

Date: Sun, 21 Dec 2008 12:48:46 -0500

NFSv4: Return unreferenced delegations more promptly

If the client is not using a delegation, the right thing to do is to return it as soon as possible. This helps reduce the amount of state the server has to track, as well as reducing the potential for conflicts with other clients.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>

linux-2.6.28-042-fix_delegation_callback.dif:

From: Trond Myklebust <Trond.Myklebust@netapp.com>

Date: Sun, 21 Dec 2008 12:48:47 -0500

NFSv4: Fix up delegation callbacks

Currently, the callback server is listening on IPv6 if it is enabled. This means that IPv4 addresses will always be mapped.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>

linux-2.6.28-043-fix_delegation_type_to_fmode.dif:

From: Trond Myklebust <Trond.Myklebust@netapp.com>

Date: Sun, 21 Dec 2008 12:48:47 -0500

NFSv4: Convert delegation->type field to fmode_t

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>

linux-2.6.28-044-cleanup_is_atomic_open.dif:

From: Trond Myklebust <Trond.Myklebust@netapp.com>

Date: Sun, 21 Dec 2008 12:48:48 -0500

NFSv4: Clean up is_atomic_open()

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>

linux-2.6.28-045-use_delegations_in_lookup_revalidate.dif:

From: Trond Myklebust <Trond.Myklebust@netapp.com>

Date: Sun, 21 Dec 2008 12:48:48 -0500

NFSv4: Ensure that we set the verifier when revalidating delegated dentries

This ensures that we don't have to look up the dentry again after we return the delegation if we know that the directory didn't change.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>

linux-2.6.28-046-use_delegations_in_access.dif:

From: Trond Myklebust <Trond.Myklebust@netapp.com>

Date: Sun, 21 Dec 2008 12:48:49 -0500

NFS: Use delegations to optimise ACCESS calls

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>

linux-2.6.28-047-nfs4_open_add_fmode.dif:

From: Trond Myklebust <Trond.Myklebust@netapp.com>

Date: Sun, 21 Dec 2008 13:17:51 -0500

NFSv4: Convert the open and close ops to use fmode

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>

linux-2.6.28-048-optimize_attribute_timeouts_for__noac__and__actimeo-0.dif:

From: Peter Staubach <staubach@redhat.com>

Date: Sun, 21 Dec 2008 13:17:56 -0500

optimize attribute timeouts for "noac" and "actimeo=0"

Hi.

I've been looking at a bugzilla which describes a problem where a customer was advised to use either the "noac" or "actimeo=0" mount options to solve a consistency problem that they were seeing in the file attributes. It turned out that this solution did not work reliably for them because sometimes, the local attribute cache was believed to be valid and not timed out. (With an attribute cache timeout of 0, the cache should always appear to be timed out.)

In looking at this situation, it appears to me that the problem is that the attribute cache timeout code has an off-by-one error in it. It is assuming that the cache is valid in the region, [read_cache_jiffies, read_cache_jiffies + attrtimeo]. The cache should be considered valid only in the region, [read_cache_jiffies, read_cache_jiffies + attrtimeo). With this change, the options, "noac" and "actimeo=0", work as originally expected.

This problem was previously addressed by special casing the attrtimeo == 0 case. However, since the problem is only an off- by-one error, the cleaner solution is address the off-by-one error and thus, not require the special case.

Thanx...

ps

Signed-off-by: Peter Staubach <staubach@redhat.com>

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>

linux-2.6.28-049-fix_gss_destroy_session.dif:

From: Jeff Layton <jlayton@redhat.com>

Date: Sun, 21 Dec 2008 13:17:57 -0500

sunrpc: fix code that makes auth_gss send destroy_cred message (try #2)

There's a bit of a chicken and egg problem when it comes to destroying auth_gss credentials. When we destroy the last instance of a GSSAPI RPC credential, we should send a NULL RPC call with a GSS procedure of RPCSEC_GSS_DESTROY to hint to the server that it can destroy those creds.

This isn't happening because we're setting clearing the uptodate bit on the credentials and then setting the operations to the gss_nullops. When we go to do the RPC call, we try to refresh the creds. That fails with -EACCES and the call fails.

Fix this by not clearing the UPTODATE bit for the credentials and adding a new crdestroy op for gss_nullops that just tears down the cred without trying to destroy the context.

The only difference between this patch and the first one is the removal of some minor formatting deltas.

Signed-off-by: Jeff Layton <jlayton@redhat.com>

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>

linux-2.6.28-050-cleanup_rpc_exit.dif:

From: Trond Myklebust <Trond.Myklebust@netapp.com>

Date: Sun, 21 Dec 2008 13:17:57 -0500

SUNRPC: Ensure that rpc_exit() always wakes up a sleeping task

Make rpc_exit() non-inline, and ensure that it always wakes up a task that has been queued.

Kill off the now unused rpc_wake_up_task().

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>

linux-2.6.28-051-cleanup_rpc_set_active.dif:

From: Trond Myklebust <Trond.Myklebust@netapp.com>

Date: Sun, 21 Dec 2008 13:17:58 -0500

SUNRPC: Move remaining RPC client related task initialisation into clnt.c

Now that rpc_run_task() is the sole entry point for RPC calls, we can move the remaining rpc_client-related initialisation of struct rpc_task from sched.c into clnt.c.

Also move rpc_killall_tasks() into the same file, since that too is relative to the rpc_clnt.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>

linux-2.6.28-052-cleanup_rpc_bind_cred.dif:

From: Trond Myklebust <Trond.Myklebust@netapp.com>

Date: Sun, 21 Dec 2008 13:17:59 -0500

SUNRPC: Clean up of rpc_bindcred()

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>

linux-2.6.28-053-constify_rpc_clnt_char_pointers.dif:

From: Trond Myklebust <Trond.Myklebust@netapp.com>

Date: Sun, 21 Dec 2008 13:17:59 -0500

SUNRPC: constify rpc_clnt fields cl_server and cl_protname

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>

linux-2.6.28-054-constify_rpc_program_name.dif:

From: Trond Myklebust <Trond.Myklebust@netapp.com>

Date: Sun, 21 Dec 2008 13:18:00 -0500

SUNRPC: constify rpc_program->name

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>

linux-2.6.28-055-constify_rpc_prog_info.dif:

From: Trond Myklebust <Trond.Myklebust@netapp.com>

Date: Sun, 21 Dec 2008 13:18:01 -0500

SUNRPC: constify the rpc_program

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>

linux-2.6.28-056-move_bind_cred.dif:

From: Trond Myklebust <Trond.Myklebust@netapp.com>

Date: Sun, 21 Dec 2008 13:18:01 -0500

SUNRPC: Defer the call to rpcauth_bindcred()

When we introduce filesyste migration, we're going to have to be able to block RPC new calls while we're replumbing the rpc_clnt. When we release them, the credential cache may have been changed too, so we shouldn't bind the creds until right when the RPC call is starting.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>

linux-2.6.28-057-cleanup_rpc_task_set_client.dif:

From: Trond Myklebust <Trond.Myklebust@netapp.com>

Date: Sun, 21 Dec 2008 13:18:02 -0500

SUNRPC: Add client to clnt->cl_tasks only when it starts executing

This will allow us to know when there are no more tasks running.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>

linux-2.6.28-100-respond_promptly_to_socket_errors_2.dif:

From: Trond Myklebust <Trond.Myklebust@netapp.com>

Date: Sun, 21 Dec 2008 13:18:02 -0500

SUNRPC: Fix the setting of xprt->reestablish_timeout when reconnecting

If the server aborts an established connection, then we should retry connecting immediately. Since xprt->reestablish_timeout is not reset unless we go through a TCP_FIN_WAIT1 state, we may end up waiting unnecessarily. The fix is to reset xprt->reestablish_timeout in TCP_ESTABLISHED, and then rely on the fact that we set it to non-zero values in all other cases when the server closes the connection.

Also fix a race between xs_connect() and xs_tcp_state_change(). The value of xprt->reestablish_timeout should be updated before we actually attempt the connection.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>

linux-2.6.28-101-speed_up_reads.dif:

From: Trond Myklebust <Trond.Myklebust@netapp.com>

Date: Sun, 21 Dec 2008 13:18:03 -0500

NFS: Accelerate reads on read/write files

Try to schedule writeout of dirty pages asynchronously at the beginning of a read instead of calling nfs_wb_page() on each page as we try to read it. The result should normally be faster because we can write out the entire chunk of data at once by means of writepages().

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>

linux-2.6.28-102-udp_connect.dif:

From: Trond Myklebust <Trond.Myklebust@netapp.com>

Date: Sun, 21 Dec 2008 13:18:04 -0500

SUNRPC: Add connected sockets for UDP

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>

[ICO]NameLast modifiedSizeDescription

[PARENTDIR]Parent Directory   -  
[TXT]linux-2.6.28-001-fix..>2008-12-21 18:18 2.0K 
[TXT]linux-2.6.28-002-fix..>2008-12-21 18:18 1.4K 
[TXT]linux-2.6.28-003-fix..>2008-12-21 18:18 6.1K 
[TXT]linux-2.6.28-004-add..>2008-12-21 18:18 6.4K 
[TXT]linux-2.6.28-005-nfs..>2008-12-21 18:18 1.6K 
[TXT]linux-2.6.28-006-rem..>2008-12-21 18:18 4.1K 
[TXT]linux-2.6.28-007-xdr..>2008-12-21 18:18 8.3K 
[TXT]linux-2.6.28-008-aut..>2008-12-21 18:18 4.5K 
[TXT]linux-2.6.28-009-nfs..>2008-12-21 18:18 777  
[TXT]linux-2.6.28-009-sun..>2008-12-21 18:18 11K 
[TXT]linux-2.6.28-010-loc..>2008-12-21 18:18 1.0K 
[TXT]linux-2.6.28-011-con..>2008-12-21 18:18 3.0K 
[TXT]linux-2.6.28-012-ren..>2008-12-21 18:18 2.3K 
[TXT]linux-2.6.28-013-mov..>2008-12-21 18:18 1.7K 
[TXT]linux-2.6.28-014-int..>2008-12-21 18:18 6.3K 
[TXT]linux-2.6.28-015-exp..>2008-12-21 18:18 2.2K 
[TXT]linux-2.6.28-016-mov..>2008-12-21 18:18 2.4K 
[TXT]linux-2.6.28-017-add..>2008-12-21 18:18 7.3K 
[TXT]linux-2.6.28-018-no_..>2008-12-21 18:18 1.9K 
[TXT]linux-2.6.28-019-all..>2008-12-21 18:18 4.8K 
[TXT]linux-2.6.28-020-fix..>2008-12-21 18:18 6.4K 
[TXT]linux-2.6.28-021-fix..>2008-12-21 18:18 4.0K 
[TXT]linux-2.6.28-022-mak..>2008-12-21 18:18 3.8K 
[TXT]linux-2.6.28-023-cle..>2008-12-21 18:18 6.0K 
[TXT]linux-2.6.28-024-pro..>2008-12-21 18:18 3.2K 
[TXT]linux-2.6.28-025-fix..>2008-12-21 18:18 13K 
[TXT]linux-2.6.28-026-don..>2008-12-21 18:18 4.4K 
[TXT]linux-2.6.28-027-don..>2008-12-21 18:18 1.4K 
[TXT]linux-2.6.28-028-als..>2008-12-21 18:18 3.6K 
[TXT]linux-2.6.28-029-fix..>2008-12-21 18:18 1.6K 
[TXT]linux-2.6.28-030-fix..>2008-12-21 18:18 5.4K 
[TXT]linux-2.6.28-031-fix..>2008-12-21 18:18 4.0K 
[TXT]linux-2.6.28-032-rem..>2008-12-21 18:18 10K 
[TXT]linux-2.6.28-033-add..>2008-12-21 18:18 7.2K 
[TXT]linux-2.6.28-034-all..>2008-12-21 18:18 6.4K 
[TXT]linux-2.6.28-035-cle..>2008-12-21 18:18 4.0K 
[TXT]linux-2.6.28-036-ren..>2008-12-21 18:18 5.2K 
[TXT]linux-2.6.28-037-fix..>2008-12-21 18:18 1.2K 
[TXT]linux-2.6.28-038-fix..>2008-12-21 18:18 1.5K 
[TXT]linux-2.6.28-039-cle..>2008-12-21 18:18 3.9K 
[TXT]linux-2.6.28-040-cle..>2008-12-21 18:18 3.0K 
[TXT]linux-2.6.28-041-cle..>2008-12-21 18:18 5.4K 
[TXT]linux-2.6.28-042-fix..>2008-12-21 18:18 3.3K 
[TXT]linux-2.6.28-043-fix..>2008-12-21 18:18 3.7K 
[TXT]linux-2.6.28-044-cle..>2008-12-21 18:18 2.3K 
[TXT]linux-2.6.28-045-use..>2008-12-21 18:18 1.4K 
[TXT]linux-2.6.28-046-use..>2008-12-21 18:18 863  
[TXT]linux-2.6.28-047-nfs..>2008-12-21 18:18 25K 
[TXT]linux-2.6.28-048-opt..>2008-12-21 18:18 5.1K 
[TXT]linux-2.6.28-049-fix..>2008-12-21 18:18 2.8K 
[TXT]linux-2.6.28-050-cle..>2008-12-21 18:18 3.0K 
[TXT]linux-2.6.28-051-cle..>2008-12-21 18:18 7.9K 
[TXT]linux-2.6.28-052-cle..>2008-12-21 18:18 5.1K 
[TXT]linux-2.6.28-053-con..>2008-12-21 18:18 3.1K 
[TXT]linux-2.6.28-054-con..>2008-12-21 18:18 1.3K 
[TXT]linux-2.6.28-055-con..>2008-12-21 18:18 15K 
[TXT]linux-2.6.28-056-mov..>2008-12-21 18:18 2.4K 
[TXT]linux-2.6.28-057-cle..>2008-12-21 18:18 1.7K 
[TXT]linux-2.6.28-100-res..>2008-12-21 18:18 2.6K 
[TXT]linux-2.6.28-101-spe..>2008-12-21 18:18 2.4K 
[TXT]linux-2.6.28-102-udp..>2008-12-21 18:18 6.9K 
[   ]series 2008-12-21 18:18 3.1K 

Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/5.4.16 mod_perl/2.0.11 Perl/v5.16.3 Server at linux-nfs.org Port 80