NFS client patches for Linux 2.6.14-rc4

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

linux-2.6.14-01-fix_iput.dif:

NFS: Fix Oopsable/unnecessary i_count manipulations in nfs_wait_on_inode()

Oopsable since nfs_wait_on_inode() can get called as part of iput_final().

Unnecessary since the caller had better be damned sure that the inode won't disappear from underneath it anyway.

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

linux-2.6.14-02-fix_attrcache.dif:

NFS: Fix cache consistency races

If the data cache has been marked as potentially invalid by nfs_refresh_inode, we should invalidate it rather than assume that changes are due to our own activity.

Also ensure that we always start with a valid cache before declaring it to be protected by a delegation.

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

linux-2.6.14-03-fix_locks.dif:

Fix Connectathon locking test failure

We currently fail Connectathon test 6.10 in the case of 32-bit locks due to incorrect error checking. Also add support for l->l_len < 0 to 64-bit locks.

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

linux-2.6.14-04-rename_unlink.dif:

NFS: Drop inode after rename

When doing a rename on top of an existing file that is not in use, the inode of the overwritten file will remain in the icache.

The fix is to decrement i_nlink of the overwritten inode, like we do for unlink, rmdir etc already.

Problem diagnosed by Olaf Kirch. This patch is a slight variation on his fix.

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

linux-2.6.14-05-fix_lock_miscompare.dif:

From: Olaf Kirch <okir@suse.de> Date: Mon, 11 Jul 2005 12:32:45 +0200 [PATCH] Fix miscompare in __posix_lock_file

If an application requests the same lock twice, the kernel should just leave the existing lock in place. Currently, it will install a second lock of the same type.

Signed-off-by: Olaf Kirch <okir@suse.de>

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

linux-2.6.14-06-fix_readdir_error_return.dif:

NFS: Don't expose internal READDIR errors to userspace

Fixes a condition whereby the kernel is returning the non-POSIX error EBADCOOKIE to userspace.

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

linux-2.6.14-07-3f704f37de4634d67a03a116256e43a2a840bdba.dif:

commit 3f704f37de4634d67a03a116256e43a2a840bdba Author: Chuck Lever <cel@citi.umich.edu> Date: Thu Aug 11 16:25:08 2005 -0400

[PATCH] RPC: Report connection errors properly when mounting with "soft"

Fix up xprt_connect_status: the soft timeout logic was clobbering tk_status, so TCP connect errors were not properly reported on soft mounts.

Test-plan: Destructive testing (unplugging the network temporarily). Connectathon with UDP and TCP.

Version: Thu, 11 Aug 2005 16:01:28 -0400

Signed-off-by: Chuck Lever <cel@netapp.com>

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

linux-2.6.14-08-5fefe27b3e2e388e3140d895c91bb9fdf6f7acae.dif:

commit 5fefe27b3e2e388e3140d895c91bb9fdf6f7acae Author: Chuck Lever <cel@citi.umich.edu> Date: Thu Aug 11 16:25:11 2005 -0400

[PATCH] RPC: proper soft timeout behavior for rpcbind

Implement a best practice: for soft mounts, an rpcbind timeout should cause an RPC request to fail.

This also provides an FSM hook for retrying an rpcbind with a different rpcbind protocol version. We'll use this later to try multiple rpcbind protocol versions when binding. To enable this, expose the RPC error code returned during a portmap request to the FSM so it can make some decision about how to report, retry, or fail the request.

Test-plan: Hundreds of passes with connectathon NFSv3 locking suite, on the client and server.

Version: Thu, 11 Aug 2005 16:01:53 -0400

Signed-off-by: Chuck Lever <cel@netapp.com>

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

linux-2.6.14-09-cd8db6f4c0c49ab5f954014d72b233dd9e73fc78.dif:

commit cd8db6f4c0c49ab5f954014d72b233dd9e73fc78 Author: Chuck Lever <cel@citi.umich.edu> Date: Thu Aug 11 16:25:14 2005 -0400

[PATCH] NFS: use a constant value for TCP retransmit timeouts

Implement a best practice: don't use exponential backoff when computing retransmit timeout values on TCP connections, but simply retransmit at regular intervals.

This also fixes a bug introduced when xprt_reset_majortimeo() was added.

Test-plan: Enable RPC debugging and watch timeout behavior on a NFS/TCP mount.

Version: Thu, 11 Aug 2005 16:02:19 -0400

Signed-off-by: Chuck Lever <cel@netapp.com>

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

linux-2.6.14-10-bbe8d582aa44ad5fe84fdb46ca591a2195afd664.dif:

commit bbe8d582aa44ad5fe84fdb46ca591a2195afd664 Author: Chuck Lever <cel@citi.umich.edu> Date: Thu Aug 11 16:25:17 2005 -0400

[PATCH] RPC: portmapper doesn't need a reserved port

The in-kernel portmapper does not require a reserved port for making bind queries.

Test-plan: Tens of runs of the Connectathon locking suite with TCP and UDP against several other NFS server implementations using NFSv3, not NFSv4 (which doesn't require rpcbind).

Version: Thu, 11 Aug 2005 16:02:43 -0400

Signed-off-by: Chuck Lever <cel@netapp.com>

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

linux-2.6.14-11-72761b8a8efab7c50a1b96b56c7316c945a2c918.dif:

commit 72761b8a8efab7c50a1b96b56c7316c945a2c918 Author: Chuck Lever <cel@citi.umich.edu> Date: Thu Aug 11 16:25:20 2005 -0400

[PATCH] RPC: extract socket logic common to both client and server

Clean-up: Move some code that is common to both RPC client- and server-side socket transports into its own source file, net/sunrpc/socklib.c.

Test-plan: Compile kernel with CONFIG_NFS enabled. Millions of fsx operations over UDP, client and server. Connectathon over UDP.

Version: Thu, 11 Aug 2005 16:03:09 -0400

Signed-off-by: Chuck Lever <cel@netapp.com>

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

linux-2.6.14-12-b9b15bef2d8395a6fd07bc38413eaa2f726d1695.dif:

commit b9b15bef2d8395a6fd07bc38413eaa2f726d1695 Author: Chuck Lever <cel@citi.umich.edu> Date: Thu Aug 11 16:25:23 2005 -0400

[PATCH] RPC: introduce client-side transport switch

Move the bulk of client-side socket-specific code into a separate source file, net/sunrpc/xprtsock.c.

Test-plan: Millions of fsx operations. Performance characterization such as "sio" or "iozone". Destructive testing (unplugging the network temporarily, server reboots). Connectathon with v2, v3, and v4.

Version: Thu, 11 Aug 2005 16:03:38 -0400

Signed-off-by: Chuck Lever <cel@netapp.com>

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

linux-2.6.14-13-5a7a25d1060f4ef203cf9a43d5f45ca67ff62688.dif:

commit 5a7a25d1060f4ef203cf9a43d5f45ca67ff62688 Author: Chuck Lever <cel@citi.umich.edu> Date: Thu Aug 11 16:25:26 2005 -0400

[PATCH] RPC: transport switch function naming

Introduce block header comments and a function naming convention to the socket transport implementation. Provide a debug setting for transports that is separate from RPCDBG_XPRT. Eliminate xprt_default_timeout().

Provide block comments for exposed interfaces in xprt.c, and eliminate the useless obvious comments.

Convert printk's to dprintk's.

Test-plan: Compile kernel with CONFIG_NFS enabled.

Version: Thu, 11 Aug 2005 16:04:04 -0400

Signed-off-by: Chuck Lever <cel@netapp.com>

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

linux-2.6.14-14-f19939ff1faac73dc6b6df6f1fe7077cd36ee71d.dif:

commit f19939ff1faac73dc6b6df6f1fe7077cd36ee71d Author: Chuck Lever <cel@citi.umich.edu> Date: Thu Aug 11 16:25:29 2005 -0400

[PATCH] RPC: Reduce stack utilization in xs_sendpages

Reduce stack utilization of the RPC socket transport's send path.

A couple of unlikely()s are added to ensure the compiler places the tail processing at the end of the csect.

Test-plan: Millions of fsx operations. Performance characterization such as "sio" or "iozone".

Version: Thu, 11 Aug 2005 16:04:30 -0400

Signed-off-by: Chuck Lever <cel@netapp.com>

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

linux-2.6.14-15-15f8c99fa8dece4b792c10c0f733349bcb490816.dif:

commit 15f8c99fa8dece4b792c10c0f733349bcb490816 Author: Chuck Lever <cel@citi.umich.edu> Date: Thu Aug 11 16:25:32 2005 -0400

[PATCH] RPC: Rename sock_lock

Clean-up: replace a name reference to sockets in the generic parts of the RPC client by renaming sock_lock in the rpc_xprt structure.

Test-plan: Compile kernel with CONFIG_NFS enabled.

Version: Thu, 11 Aug 2005 16:05:00 -0400

Signed-off-by: Chuck Lever <cel@netapp.com>

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

linux-2.6.14-16-e8a77999868c22ad0d342e140856f01a81265299.dif:

commit e8a77999868c22ad0d342e140856f01a81265299 Author: Chuck Lever <cel@citi.umich.edu> Date: Thu Aug 11 16:25:35 2005 -0400

[PATCH] RPC: Rename xprt_lock

Clean-up: Replace the xprt_lock with something more aptly named. This lock single-threads the XID and request slot reservation process.

Test-plan: Compile kernel with CONFIG_NFS enabled.

Version: Thu, 11 Aug 2005 16:05:26 -0400

Signed-off-by: Chuck Lever <cel@netapp.com>

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

linux-2.6.14-17-04d861147c1223a7220407ded7b9d67901a17cac.dif:

commit 04d861147c1223a7220407ded7b9d67901a17cac Author: Chuck Lever <cel@citi.umich.edu> Date: Thu Aug 11 16:25:38 2005 -0400

[PATCH] RPC: rename the sockstate field

Clean-up: get rid of a name reference to sockets in the generic parts of the RPC client by renaming the sockstate field in the rpc_xprt structure.

Test-plan: Compile kernel with CONFIG_NFS enabled.

Version: Thu, 11 Aug 2005 16:05:53 -0400

Signed-off-by: Chuck Lever <cel@netapp.com>

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

linux-2.6.14-18-eeb3415dcbf41f6ea6d121cdc5162a66a2003df9.dif:

commit eeb3415dcbf41f6ea6d121cdc5162a66a2003df9 Author: Chuck Lever <cel@citi.umich.edu> Date: Thu Aug 11 16:25:41 2005 -0400

[PATCH] RPC: Eliminate socket.h includes in RPC client

Clean-up: get rid of unnecessary socket.h and in.h includes in the generic parts of the RPC client.

Test-plan: Compile kernel with CONFIG_NFS enabled.

Version: Thu, 11 Aug 2005 16:06:23 -0400

Signed-off-by: Chuck Lever <cel@netapp.com>

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

linux-2.6.14-19-0e7b30d3a1874da406c4b159452e83c58e6590db.dif:

commit 0e7b30d3a1874da406c4b159452e83c58e6590db Author: Chuck Lever <cel@citi.umich.edu> Date: Thu Aug 11 16:25:44 2005 -0400

[PATCH] RPC: Add helper for waking tasks pending on a transport

Clean-up: remove only reference to xprt->pending from the socket transport implementation. This makes a cleaner interface for other transport implementations as well.

Test-plan: Compile kernel with CONFIG_NFS enabled.

Version: Thu, 11 Aug 2005 16:06:52 -0400

Signed-off-by: Chuck Lever <cel@netapp.com>

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

linux-2.6.14-20-ac8b5d067c2b0385ca777d47ffa1b2cfcbe471b3.dif:

commit ac8b5d067c2b0385ca777d47ffa1b2cfcbe471b3 Author: Chuck Lever <cel@citi.umich.edu> Date: Thu Aug 11 16:25:47 2005 -0400

[PATCH] RPC: client-side transport switch cleanup

Clean-up: change some comments to reflect the realities of the new RPC transport switch mechanism. Get rid of unused xprt_receive() prototype.

Also, organize function prototypes in xprt.h by usage and scope.

Test-plan: Compile kernel with CONFIG_NFS enabled.

Version: Thu, 11 Aug 2005 16:07:21 -0400

Signed-off-by: Chuck Lever <cel@netapp.com>

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

linux-2.6.14-21-9f61f99a5f917d08ef99853650b3497364834972.dif:

commit 9f61f99a5f917d08ef99853650b3497364834972 Author: Chuck Lever <cel@citi.umich.edu> Date: Thu Aug 11 16:25:50 2005 -0400

[PATCH] RPC: separate TCP and UDP write space callbacks

Split the socket write space callback function into a TCP version and UDP version, eliminating one dependence on the "xprt->stream" variable.

Keep the common pieces of this path in xprt.c so other transports can use it too.

Test-plan: Write-intensive workload on a single mount point.

Version: Thu, 11 Aug 2005 16:07:51 -0400

Signed-off-by: Chuck Lever <cel@netapp.com>

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

linux-2.6.14-22-23c099062393a791aef46dd1eaa144e97614a515.dif:

commit 23c099062393a791aef46dd1eaa144e97614a515 Author: Chuck Lever <cel@citi.umich.edu> Date: Thu Aug 11 16:25:53 2005 -0400

[PATCH] RPC: separate TCP and UDP transport connection logic

Create separate connection worker functions for managing UDP and TCP transport sockets. This eliminates several dependencies on "xprt->stream".

Test-plan: Destructive testing (unplugging the network temporarily). Connectathon with v2, v3, and v4.

Version: Thu, 11 Aug 2005 16:08:18 -0400

Signed-off-by: Chuck Lever <cel@netapp.com>

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

linux-2.6.14-23-3c11d88fd57a4b378dd1cecd67bd4101cc2084f8.dif:

commit 3c11d88fd57a4b378dd1cecd67bd4101cc2084f8 Author: Chuck Lever <cel@citi.umich.edu> Date: Thu Aug 11 16:25:56 2005 -0400

[PATCH] RPC: separate TCP and UDP socket write paths

Split the RPC client's main socket write path into a TCP version and a UDP version to eliminate another dependency on the "xprt->stream" variable.

Compiler optimization removes unneeded code from xs_sendpages, as this function is now called with some constant arguments.

We can now cleanly perform transport protocol-specific return code testing and error recovery in each path.

Test-plan: Millions of fsx operations. Performance characterization such as "sio" or "iozone". Examine oprofile results for any changes before and after this patch is applied.

Version: Thu, 11 Aug 2005 16:08:46 -0400

Signed-off-by: Chuck Lever <cel@netapp.com>

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

linux-2.6.14-24-xprt_tsh_size.dif:

[PATCH] RPC: skip over transport-specific heads automatically

Add a generic mechanism for skipping over transport-specific headers when constructing an RPC request. This removes another "xprt->stream" dependency.

Test-plan: Write-intensive workload on a single mount point (try both UDP and TCP).

Signed-off-by: Chuck Lever <cel@netapp.com>

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

linux-2.6.14-25-xprt-no-stream.dif:

[PATCH] RPC: get rid of xprt->stream

Now we can fix up the last few places that use the "xprt->stream" variable, and get rid of it from the rpc_xprt structure.

Test-plan: Destructive testing (unplugging the network temporarily). Connectathon with UDP and TCP.

Signed-off-by: Chuck Lever <cel@netapp.com>

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

linux-2.6.14-26-xprt-set_retrans_timeout.dif:

[PATCH] RPC: add API to set transport-specific timeouts

Prepare the way to remove the "xprt->nocong" variable by adding a callout to the RPC client transport switch API to handle setting RPC retransmit timeouts.

Add a pair of generic helper functions that provide the ability to set a simple fixed timeout, or to set a timeout based on the state of a round- trip estimator.

Test-plan: Use WAN simulation to cause sporadic bursty packet loss. Look for significant regression in performance or client stability.

Signed-off-by: Chuck Lever <cel@netapp.com>

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

linux-2.6.14-27-xprt_reserve_xprt.dif:

[PATCH] RPC: expose API for serializing access to RPC transports

The next several patches introduce an API that allows transports to choose whether the RPC client provides congestion control or whether the transport itself provides it.

The first method we abstract is the one that serializes access to the RPC transport to prevent the bytes from different requests from mingling together. This method provides proper request serialization and the opportunity to prevent new requests from being started because the transport is congested.

The normal situation is for the transport to handle congestion control itself. Although NFS over UDP was first, it has been recognized after years of experience that having the transport provide congestion control is much better than doing it in the RPC client. Thus TCP, and probably every future transport implementation, will use the default method, xprt_lock_write, provided in xprt.c, which does not provide any kind of congestion control. UDP can continue using the xprt.c-provided Van Jacobson congestion avoidance implementation.

Test-plan: Use WAN simulation to cause sporadic bursty packet loss. Look for significant regression in performance or client stability.

Signed-off-by: Chuck Lever <cel@netapp.com>

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

linux-2.6.14-28-xprt_release_xprt.dif:

[PATCH] RPC: expose API for serializing access to RPC transports

The next method we abstract is the one that releases a transport, allowing another task to have access to the transport.

Again, one generic version of this is provided for transports that don't need the RPC client to perform congestion control, and one version is for transports that can use the original Van Jacobson implementation in xprt.c.

Test-plan: Use WAN simulation to cause sporadic bursty packet loss. Look for significant regression in performance or client stability.

Signed-off-by: Chuck Lever <cel@netapp.com>

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

linux-2.6.14-29-xprt_timer.dif:

[PATCH] RPC: separate xprt_timer implementations

Allow transports to hook the retransmit timer interrupt. Some transports calculate their congestion window here so that a retransmit timeout has immediate effect on the congestion window.

Test-plan: Use WAN simulation to cause sporadic bursty packet loss. Look for significant regression in performance or client stability.

Signed-off-by: Chuck Lever <cel@netapp.com>

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

linux-2.6.14-30-xprt_complete_rqst.dif:

[PATCH] RPC: add generic interface for adjusting the congestion window

A new interface that allows transports to adjust their congestion window using the Van Jacobson implementation in xprt.c is provided.

Test-plan: Use WAN simulation to cause sporadic bursty packet loss. Look for significant regression in performance or client stability.

Signed-off-by: Chuck Lever <cel@netapp.com>

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

linux-2.6.14-31-xprt_release_request.dif:

[PATCH] RPC: add a release_rqst callout to the RPC transport switch

The final place where congestion control state is adjusted is in xprt_release, where each request is finally released. Add a callout there to allow transports to perform additional processing when a request is about to be released.

Test-plan: Use WAN simulation to cause sporadic bursty packet loss. Look for significant regression in performance or client stability.

Signed-off-by: Chuck Lever <cel@netapp.com>

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

linux-2.6.14-32-xprt-no-nocong.dif:

[PATCH] RPC: remove xprt->nocong

Get rid of the "xprt->nocong" variable.

Test-plan: Use WAN simulation to cause sporadic bursty packet loss with UDP mounts. Look for significant regression in performance or client stability.

Signed-off-by: Chuck Lever <cel@netapp.com>

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

linux-2.6.14-33-xprt-nocong-cleanup.dif:

[PATCH] RPC: clean up after nocong was removed

Clean-up: Move some macros that are specific to the Van Jacobson implementation into xprt.c. Get rid of the cong_wait field in rpc_xprt, which is no longer used. Get rid of xprt_clear_backlog.

Test-plan: Compile with CONFIG_NFS enabled.

Signed-off-by: Chuck Lever <cel@netapp.com>

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

linux-2.6.14-34-xprt-bindresvport.dif:

[PATCH] RPC: allow RPC client's port range to be adjustable

Select an RPC client source port between 650 and 1023 instead of between 1 and 800. The old range conflicts with a number of network services. Provide sysctls to allow admins to select a different port range.

Note that this doesn't affect user-level RPC library behavior, which still uses 1 to 800.

Based on a suggestion by Olaf Kirch <okir@suse.de>.

Test-plan: Repeated mount and unmount. Destructive testing. Idle timeouts.

Signed-off-by: Chuck Lever <cel@netapp.com>

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

linux-2.6.14-35-xprt-tcp-reuseport.dif:

[PATCH] RPC: make sure to get the same local port number when reconnecting

Implement a best practice: if the remote end drops our connection, try to reconnect using the same port number. This is important because the NFS server's Duplicate Reply Cache often hashes on the source port number. If the client reuses the port number when it reconnects, the server's DRC will be more effective.

Based on suggestions by Mike Eisler, Olaf Kirch, and Alexey Kuznetsky.

Test-plan: Destructive testing.

Signed-off-by: Chuck Lever <cel@netapp.com>

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

linux-2.6.14-36-xprt-timeouts.dif:

[PATCH] RPC: parametrize various transport connect timeouts

Each transport implementation can now set unique bind, connect, reestablishment, and idle timeout values. These are variables, allowing the values to be modified dynamically. This permits exponential backoff of any of these values, for instance.

As an example, we implement exponential backoff for the connection reestablishment timeout.

Test-plan: Destructive testing (unplugging the network temporarily). Connectathon with UDP and TCP.

Signed-off-by: Chuck Lever <cel@netapp.com>

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

linux-2.6.14-37-xprt-setbufsize.dif:

[PATCH] RPC: rationalize set_buffer_size

In fact, ->set_buffer_size should be completely functionless for non-UDP.

Test-plan: Check socket buffer size on UDP sockets over time.

Signed-off-by: Chuck Lever <cel@netapp.com>

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

linux-2.6.14-38-proc_display_proto.dif:

NFS: Make /proc/mounts display the protocol used by NFSv4

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

linux-2.6.14-39-fix_portmap_set.dif:

Author: Chuck Lever <cel@citi.umich.edu> Date: Thu, 22 Sep 2005 21:24:59 -0400 (EDT) SUNRPC: fix bug in patch "portmapper doesn't need a reserved port"

The in-kernel portmapper does in fact need a reserved port when registering new services, but not when performing bind queries.

Ensure that we distinguish between the two cases.

Signed-off-by: Chuck Lever <cel@netapp.com>

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

linux-2.6.14-40-fix_call_bind.dif:

Author: Chuck Lever <cel@netapp.com> Date: Thu, 06 Oct 2005 23:12:58 -0400 SUNRPC: Retry rpcbind requests if the server's portmapper isn't up

After a server crash/reboot, rebinding should always retry, otherwise requests on "hard" mounts will fail when they shouldn't.

Test plan: Run a lock-intensive workload against a server while rebooting the server repeatedly.

Signed-off-by: Chuck Lever <cel@netapp.com>

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

linux-2.6.14-41-cleanup_transmit.dif:

RPC: allow call_encode() to delay transmission of an RPC call.

Currently, call_encode will cause the entire RPC call to abort if it returns an error. This is unnecessarily rigid, and gets in the way of attempts to allow the NFSv4 layer to order RPC calls that carry sequence ids.

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

linux-2.6.14-42-seqid_ordering.dif:

NFSv4: Add functions to order RPC calls

NFSv4 file state-changing functions such as OPEN, CLOSE, LOCK,... are all labelled with "sequence identifiers" in order to prevent the server from reordering RPC requests, as this could cause its file state to become out of sync with the client.

Currently the NFS client code enforces this ordering locally using semaphores to restrict access to structures until the RPC call is done. This, of course, only works with synchronous RPC calls, since the user process must first grab the semaphore. By dropping semaphores, and instead teaching the RPC engine to hold the RPC calls until they are ready to be sent, we can extend this process to work nicely with asynchronous RPC calls too.

This patch adds a new list called "rpc_sequence" that defines the order of the RPC calls to be sent. We add one such list for each state_owner. When an RPC call is ready to be sent, it checks if it is top of the rpc_sequence list. If so, it proceeds. If not, it goes back to sleep, and loops until it hits top of the list. Once the RPC call has completed, it can then bump the sequence id counter, and remove itself from the rpc_sequence list, and then wake up the next sleeper.

Note that the state_owner sequence ids and lock_owner sequence ids are all indexed to the same rpc_sequence list, so OPEN, LOCK,... requests are all ordered w.r.t. each other.

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

linux-2.6.14-43-fix_race_in_close.dif:

NFSv4: Fix a potential CLOSE race

Once the state_owner and lock_owner semaphores get removed, it will be possible for other OPEN requests to reopen the same file if they have lower sequence ids than our CLOSE call. This patch ensures that we recheck the file state once nfs_wait_on_sequence() has completed waiting.

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

linux-2.6.14-44-remove_semaphores.dif:

NFSv4: Remove obsolete state_owner and lock_owner semaphores

OPEN, CLOSE, etc no longer need these semaphores to ensure ordering of requests.

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

linux-2.6.14-45-remove_close_semaphores.dif:

NFSv4: Remove nfs4_client->cl_sem from close() path

We no longer need to worry about collisions between close() and the state recovery code, since the new close will automatically recheck the file state once it is done waiting on its sequence slot.

Ditto for the nfs4_proc_locku() procedure.

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

linux-2.6.14-46-confirm_deleg_open.dif:

NFSv4: Add missing handling of OPEN_CONFIRM requests on CLAIM_DELEGATE_CUR.

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

linux-2.6.14-47-async_locku.dif:

NFSv4: Make NFS clean up byte range locks asynchronously

Currently we fail to do so if the process was signalled.

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

linux-2.6.14-48-lock_fixups.dif:

NFSv4: Fix up handling of open_to_lock sequence ids

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

linux-2.6.14-49-lockt_fixup.dif:

NFS: Fix up a race in the NFS implementation of GETLK

...and fix a memory corruption bug due to improper use of memcpy() on a struct file_lock.

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

linux-2.6.14-50-open_file_intents.dif:

VFS: Allow the filesystem to return a full file pointer on open intent

This is needed by NFSv4 for atomicity reasons: our open command is in fact a lookup+open, so we need to be able to propagate open context information from lookup() into the resulting struct file's private_data field.

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

linux-2.6.14-51-nfs4_open_file_intents.dif:

NFSv4: Eliminate nfsv4 open race...

Make NFSv4 return the fully initialized file pointer with the stateid that it created in the lookup w/intent.

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

linux-2.6.14-52-nfs4_open_check_filetype.dif:

[NFS]: Check that the server returns a valid regular file to our OPEN request

Since it appears that some servers don't...

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

linux-2.6.14-53-vfs_fix_permission_intent.dif:

VFS: Make link_path_walk set LOOKUP_CONTINUE before calling permission().

This will allow nfs_permission() to perform additional optimizations when walking the path, by folding the ACCESS(MAY_EXEC) call on the directory into the lookup revalidation.

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

linux-2.6.14-54-rename_unlink_return_delegation.dif:

NFSv4: Return delegation upon rename or removal of file.

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

linux-2.6.14-55-setattr_return_delegation.dif:

NFSv4: Return delegations in case we're changing ACLs

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

linux-2.6.14-56-open_return_delegation.dif:

NFSv4: If a delegated open fails, ensure that we return the delegation

Unless of course the open fails due to permission issues.

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

linux-2.6.14-57-open_retry_badstateid.dif:

NFSv4: Ensure that we recover from the OPEN + OPEN_CONFIRM BAD_STATEID race

If the server is in the unconfirmed OPEN state for a given open owner and receives a second OPEN for the same open owner, it will cancel the state of the first request and set up an OPEN_CONFIRM for the second.

This can cause a race that is discussed in rfc3530 on page 181.

The following patch allows the client to recover by retrying the original open request.

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

linux-2.6.14-NFS_ALL.dif:

All of the above

[ICO]NameLast modifiedSizeDescription

[PARENTDIR]Parent Directory   -  
[TXT]linux-2.6.14-01-fix_..>2005-10-14 15:48 919  
[TXT]linux-2.6.14-02-fix_..>2005-10-14 16:52 2.6K 
[TXT]linux-2.6.14-03-fix_..>2005-10-13 14:29 2.1K 
[TXT]linux-2.6.14-04-rena..>2005-08-18 20:53 803  
[TXT]linux-2.6.14-05-fix_..>2005-10-18 22:27 1.3K 
[TXT]linux-2.6.14-06-fix_..>2005-08-18 21:11 625  
[TXT]linux-2.6.14-07-3f70..>2005-08-17 16:41 2.0K 
[TXT]linux-2.6.14-08-5fef..>2005-08-17 16:41 5.0K 
[TXT]linux-2.6.14-09-cd8d..>2005-08-18 18:41 5.0K 
[TXT]linux-2.6.14-10-bbe8..>2005-08-17 16:41 1.1K 
[TXT]linux-2.6.14-11-7276..>2005-08-17 16:41 10K 
[TXT]linux-2.6.14-12-b9b1..>2005-08-17 16:41 62K 
[TXT]linux-2.6.14-13-5a7a..>2005-08-17 16:41 33K 
[TXT]linux-2.6.14-14-f199..>2005-08-17 16:41 4.3K 
[TXT]linux-2.6.14-15-15f8..>2005-08-17 16:41 9.3K 
[TXT]linux-2.6.14-16-e8a7..>2005-08-17 16:41 2.0K 
[TXT]linux-2.6.14-17-04d8..>2005-08-17 16:41 5.7K 
[TXT]linux-2.6.14-18-eeb3..>2005-08-17 16:41 3.5K 
[TXT]linux-2.6.14-19-0e7b..>2005-08-17 16:41 3.2K 
[TXT]linux-2.6.14-20-ac8b..>2005-08-17 16:41 9.5K 
[TXT]linux-2.6.14-21-9f61..>2005-08-17 16:41 6.8K 
[TXT]linux-2.6.14-22-23c0..>2005-08-17 16:41 7.4K 
[TXT]linux-2.6.14-23-3c11..>2005-08-17 16:41 10K 
[TXT]linux-2.6.14-24-xprt..>2005-08-18 05:19 6.5K 
[TXT]linux-2.6.14-25-xprt..>2005-08-18 05:19 4.7K 
[TXT]linux-2.6.14-26-xprt..>2005-08-18 05:19 5.6K 
[TXT]linux-2.6.14-27-xprt..>2005-08-20 02:35 6.1K 
[TXT]linux-2.6.14-28-xprt..>2005-08-20 02:35 6.6K 
[TXT]linux-2.6.14-29-xprt..>2005-08-18 05:19 4.8K 
[TXT]linux-2.6.14-30-xprt..>2005-08-20 02:35 5.0K 
[TXT]linux-2.6.14-31-xprt..>2005-08-18 05:18 2.9K 
[TXT]linux-2.6.14-32-xprt..>2005-08-18 05:18 2.0K 
[TXT]linux-2.6.14-33-xprt..>2005-08-20 02:35 5.4K 
[TXT]linux-2.6.14-34-xprt..>2005-08-18 05:18 5.7K 
[TXT]linux-2.6.14-35-xprt..>2005-08-18 05:18 3.7K 
[TXT]linux-2.6.14-36-xprt..>2005-08-18 05:17 8.8K 
[TXT]linux-2.6.14-37-xprt..>2005-08-18 05:17 3.7K 
[TXT]linux-2.6.14-38-proc..>2005-08-19 15:19 1.4K 
[TXT]linux-2.6.14-39-fix_..>2005-09-23 17:51 2.7K 
[TXT]linux-2.6.14-40-fix_..>2005-10-14 17:41 1.0K 
[TXT]linux-2.6.14-41-clea..>2005-10-14 17:56 3.3K 
[TXT]linux-2.6.14-42-seqi..>2005-10-16 03:34 27K 
[TXT]linux-2.6.14-43-fix_..>2005-10-14 20:28 7.9K 
[TXT]linux-2.6.14-44-remo..>2005-10-14 22:36 9.0K 
[TXT]linux-2.6.14-45-remo..>2005-10-14 22:36 3.1K 
[TXT]linux-2.6.14-46-conf..>2005-10-14 20:40 2.1K 
[TXT]linux-2.6.14-47-asyn..>2005-10-14 20:40 9.9K 
[TXT]linux-2.6.14-48-lock..>2005-10-14 21:44 6.9K 
[TXT]linux-2.6.14-49-lock..>2005-10-13 22:15 1.5K 
[TXT]linux-2.6.14-50-open..>2005-10-12 18:57 11K 
[TXT]linux-2.6.14-51-nfs4..>2005-10-14 20:52 11K 
[TXT]linux-2.6.14-52-nfs4..>2005-10-14 20:52 1.5K 
[TXT]linux-2.6.14-53-vfs_..>2005-10-13 03:04 1.0K 
[TXT]linux-2.6.14-54-rena..>2005-10-14 20:53 3.4K 
[TXT]linux-2.6.14-55-seta..>2005-10-14 20:53 1.2K 
[TXT]linux-2.6.14-56-open..>2005-10-14 20:53 589  
[TXT]linux-2.6.14-57-open..>2005-10-14 22:00 1.2K 
[TXT]linux-2.6.14-NFS_ALL..>2005-10-16 22:06 206K 

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