NFS client patches for Linux 2.6.24-rc8

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

linux-2.6.24-001-cleanup_locking_in_nfs4_lock_prepare.dif:

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

Date: Tue, 8 Jan 2008 17:56:07 -0500

NFSv4: Clean up the OPEN/CLOSE serialisation code

Reduce the time spent locking the rpc_sequence structure by queuing the nfs_seqid only when we are ready to take the lock (when calling nfs_wait_on_sequence).

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

linux-2.6.24-002-fix_sillyrename_bug_on_umount.dif:

From: Steve Dickson <SteveD@redhat.com>

Date: Thu, 08 Nov 2007 04:05:04 -0500

NFS: Stop sillyname renames and unmounts from racing

Added an active/deactive mechanism to the nfs_server structure allowing async operations to hold off umount until the operations are done.

Signed-off-by: Steve Dickson <steved@redhat.com>

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

linux-2.6.24-003-sunrpc_fix_race_in_tcp_state_change.dif:

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

Date: Tue, 6 Nov 2007 10:18:36 -0500

SUNRPC: Fix a race in xs_tcp_state_change()

When scheduling the autoclose RPC call, we want to ensure that we don't race against the test_bit() call in xprt_clear_locked().

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

linux-2.6.24-004-sunrpc_fix_tcp_rebind.dif:

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

Date: Mon, 5 Nov 2007 17:40:58 -0500

SUNRPC: Fix TCP rebinding logic

Currently the TCP rebinding logic assumes that if we're not using a reserved port, then we don't need to reconnect on the same port if a disconnection event occurs. This breaks most RPC duplicate reply cache implementations.

Also take into account the fact that xprt_min_resvport and xprt_max_resvport may change while we're reconnecting, since the user may change them at any time via the sysctls. Ensure that we check the port boundaries every time we loop in xs_bind4/xs_bind6. Also ensure that if the boundaries change, we only scan the ports a maximum of 2 times.

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

linux-2.6.24-005-sunrpc_allow_client_to_detect_close.dif:

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

Date: Mon, 5 Nov 2007 17:42:39 -0500

SUNRPC: Allow the client to detect if the TCP connection is closed

Add an xprt->state bit to enable the TCP ->state_change() method to signal whether or not the TCP connection is in the process of closing down. This will to be used by the reconnection logic in a separate patch.

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

linux-2.6.24-006-sunrpc_tcp_fixup_close_wait.dif:

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

Date: Mon, 31 Dec 2007 16:19:17 -0500

SUNRPC: TCP clear XPRT_CLOSE_WAIT when the socket is closed for writes

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

linux-2.6.24-007-sunrpc_use_shutdown_instead_of_close.dif:

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

Date: Mon, 5 Nov 2007 15:44:12 -0500

SUNRPC: Use shutdown() instead of close() when disconnecting a TCP socket

By using shutdown() rather than close() we allow the RPC client to wait for the TCP close handshake to complete before we start trying to reconnect using the same port. We use shutdown(SHUT_WR) only instead of shutting down both directions, however we wait until the server has closed the connection on its side.

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

linux-2.6.24-008-sunrpc_xprt_autoclose_dont_call_disconnect.dif:

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

Date: Tue, 6 Nov 2007 18:28:53 -0500

SUNRPC: xprt_autoclose() should not call xprt_disconnect()

The transport layer should do that itself whenever appropriate.

Note that the RDMA transport already assumes that it needs to call xprt_disconnect in xprt_rdma_close(). For TCP sockets, we want to call xprt_disconnect() only after the connection has been closed by both ends.

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

linux-2.6.24-009-sunrpc_rpc_client_dont_call_xprt_disconnect.dif:

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

Date: Tue, 6 Nov 2007 18:40:12 -0500

SUNRPC: Make call_status()/call_decode() call xprt_force_disconnect()

Move the calls to xprt_disconnect() over to xprt_force_disconnect() in order to enable the transport layer to manage the state of the XPRT_CONNECTED flag. Ditto in xs_tcp_read_fraghdr().

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

linux-2.6.24-010-sunrpc_rename_xprt_disconnect.dif:

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

Date: Tue, 6 Nov 2007 18:44:20 -0500

SUNRPC: Rename xprt_disconnect()

xprt_disconnect() should really only be called when the transport shutdown is completed, and it is time to wake up any pending tasks. Rename it to xprt_disconnect_done() in order to reflect the semantical change.

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

linux-2.6.24-011-tcp_set_timeout_policy.dif:

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

Date: Tue, 1 Jan 2008 18:42:12 -0500

SUNRPC: Reconnect immediately whenever the server isn't refusing it.

If we've disconnected from the server, rather than the other way round, then it makes little sense to wait 3 seconds before reconnecting.

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

linux-2.6.24-012-rpc_pipefs_document_interfaces.dif:

From: J. Bruce Fields <bfields@citi.umich.edu>

Date: Tue, 6 Nov 2007 13:06:03 -0500

sunrpc: document the rpc_pipefs kernel api

Add kerneldoc comments for the rpc_pipefs.c functions that are exported.

Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>

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

linux-2.6.24-013-move_exported_symbols_to_declaration.dif:

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

Date: Sat, 14 Jul 2007 15:39:58 -0400

SUNRPC: Move exported declarations to the function declarations

Do this for all RPC client related functions and XDR functions.

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

linux-2.6.24-014-move_exported_symbols_to_declaration2.dif:

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

Date: Sat, 14 Jul 2007 15:39:58 -0400

SUNRPC: Move exported symbol definitions after function declaration part 2

Do it for the server code...

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

linux-2.6.24-015-restrict_sunrpc_client_exports.dif:

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

Date: Sat, 14 Jul 2007 15:39:59 -0400

SUNRPC: Restrict sunrpc client exports

The sunrpc client exports are not meant to be part of any official kernel API: they can change at the drop of a hat. Mark them as internal functions using EXPORT_SYMBOL_GPL.

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

linux-2.6.24-016-clean_up_rpc_init_task.dif:

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

Date: Sat, 14 Jul 2007 15:39:59 -0400

SUNRPC: Cleanup of rpc_task initialisation

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

linux-2.6.24-017-clean_up_rpc_run_task.dif:

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

Date: Sat, 14 Jul 2007 15:39:59 -0400

SUNRPC: Clean up rpc_run_task

Make it use the new task initialiser structure instead of acting as a wrapper.

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

linux-2.6.24-018-clean_up_rpc_task_priority_init.dif:

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

Date: Sat, 14 Jul 2007 15:40:00 -0400

SUNRPC: Clean up the initialisation of priority queue scheduling info.

We want the default scheduling priority (priority == 0) to remain RPC_PRIORITY_NORMAL.

Also ensure that the priority wait queue scheduling is per process id instead of sometimes being per thread, and sometimes being per inode.

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

linux-2.6.24-019-mask_signals_in_rpc_run_task.dif:

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

Date: Thu, 25 Oct 2007 18:19:37 -0400

SUNRPC: Mask signals across the call to rpc_call_setup() in rpc_run_task

To ensure that the RPCSEC_GSS upcall is performed with the correct sigmask.

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

linux-2.6.24-020-add_helper_rpc_call_start.dif:

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

Date: Thu, 25 Oct 2007 18:40:21 -0400

SUNRPC: Add a helper rpc_call_start() that initialises task->tk_action

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

linux-2.6.24-021-make_rpc_init_task_initialise_rpc_message.dif:

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

Date: Thu, 25 Oct 2007 18:32:34 -0400

SUNRPC: Allow rpc_init_task() to initialise the rpc_task->tk_msg

In preparation for the removal of rpc_call_setup().

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

linux-2.6.24-022-clean_up_nfs_read_write_commit_setup.dif:

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

Date: Sat, 14 Jul 2007 15:40:00 -0400

NFS: Clean up the (commit|read|write)_setup() callback routines

Move the common code for setting up the nfs_write_data and nfs_read_data structures into fs/nfs/read.c, fs/nfs/write.c and fs/nfs/direct.c.

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

linux-2.6.24-023-convert_users_of_rpc_call_setup.dif:

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

Date: Sat, 14 Jul 2007 15:40:01 -0400

NFS/SUNRPC: Convert all users of rpc_call_setup()

Replace use of rpc_call_setup() with rpc_init_task(), and in cases where we need to initialise task->tk_action, with rpc_call_start().

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

linux-2.6.24-024-remove_rpc_call_setup.dif:

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

Date: Thu, 25 Oct 2007 18:42:21 -0400

SUNRPC: Remove the now unused function rpc_call_setup()

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

linux-2.6.24-025-allow_preallocation_of_rpc_task.dif:

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

Date: Thu, 25 Oct 2007 18:42:53 -0400

SUNRPC: allow the caller of rpc_run_task to preallocate the struct rpc_task

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

linux-2.6.24-026-convert_users_of_rpc_execute.dif:

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

Date: Thu, 25 Oct 2007 18:42:54 -0400

NFS/SUNRPC: Convert users of rpc_init_task+rpc_execute to rpc_run_task()

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

linux-2.6.24-027-unexport_rpc_init_task_rpc_execute.dif:

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

Date: Thu, 25 Oct 2007 18:42:55 -0400

SUNRPC: Unexport rpc_init_task() and rpc_execute()

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

linux-2.6.24-028-remove_RPC_WAITQ_declarations.dif:

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

Date: Wed, 18 Jul 2007 13:24:19 -0400

SUNRPC: Cleanup to remove the last users of the RPC_WAITQ declaration

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

linux-2.6.24-029-remove_RPC_WAITQ_macro.dif:

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

Date: Wed, 18 Jul 2007 18:32:38 -0400

SUNRPC: Remove the obsolete RPC_WAITQ macro

Now that we've killed off all the users.

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

linux-2.6.24-030-prevent_mixed_sign_comparisons_in_rpcrdma_convert_iovs.dif:

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

Date: Fri, 26 Oct 2007 13:30:43 -0400

SUNRPC: Prevent mixed sign comparisons in rpcrdma_convert_iovs()

Keep the type of the buffer position the same during iovec conversion to reduce the likelihood of unexpected results from comparisons and length computations.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Cc: Thomas Talpey <Thomas.Talpey@netapp.com>

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

linux-2.6.24-031-fix_an_unnecessary_implicit_type_cast_in_rpcrdma_count_chunks.dif:

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

Date: Fri, 26 Oct 2007 13:30:49 -0400

SUNRPC: Fix an unnecessary implicit type cast in rpcrdma_count_chunks()

Nit: rl_nchunks is an unsigned integer, so pass it into rpcrdma_count_chunks() via an unsigned integer argument. This eliminates a harmless mixed sign comparison in rpcrdma_count_chunks()

Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Cc: Thomas Talpey <Thomas.Talpey@netapp.com>

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

linux-2.6.24-032-check_a_return_result.dif:

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

Date: Fri, 26 Oct 2007 13:30:54 -0400

SUNRPC: Check a return result

Minor: Replace an empty if statement with a debugging dprintk.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Cc: Thomas Talpey <Thomas.Talpey@netapp.com>

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

linux-2.6.24-033-temp_var_should_match_return_type_of_xdr_skb_read_actor.dif:

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

Date: Fri, 26 Oct 2007 13:30:59 -0400

SUNRPC: temp var should match return type of xdr_skb_read_actor

The return type of xdr_skb_read_actor functions is size_t. This fixes a nit I unwittingly overlooked in commit dd456471.

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

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

linux-2.6.24-034-remove_an_unneeded_implicit_type_cast_when_calling_rpc_depopulate.dif:

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

Date: Fri, 26 Oct 2007 13:31:04 -0400

SUNRPC: Remove an unneeded implicit type cast when calling rpc_depopulate()

The two arguments of rpc_depopulate() that pass in inode numbers should use the same type as inode->i_ino: unsigned long.

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

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

linux-2.6.24-035-fix_return_type_mismatch_in_svc_max_payload.dif:

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

Date: Fri, 26 Oct 2007 13:31:15 -0400

SUNRPC: Fix return type mismatch in svc_max_payload()

Nit: make sure return type and type of temporary return value match in svc_max_payload().

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

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

linux-2.6.24-036-ensure_nfs_wcc_update_inode_always_converts_file_size_to_loff_t.dif:

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

Date: Fri, 26 Oct 2007 13:31:47 -0400

NFS: Ensure nfs_wcc_update_inode always converts file size to loff_t

The nfs_wcc_update_inode() function omits logic to convert the type of the NFS on-the-wire value of a file's size (__u64) to the type of file size value stored in struct inode (loff_t, which is signed).

Everywhere else in the NFS client I checked already correctly converts the file size type.

This effects only very large files.

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

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

linux-2.6.24-037-use_unsigned_intermediates_for_manipulating_header_lengths_nfsv2_xdr.dif:

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

Date: Fri, 26 Oct 2007 13:31:52 -0400

NFS: Use unsigned intermediates for manipulating header lengths (NFSv2 XDR)

Clean up: prevent length underflow and mixed sign comparisons when unmarshalling NFS version 2 read, readdir, and readlink replies.

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

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

linux-2.6.24-038-use_unsigned_intermediates_for_manipulating_header_lengths_nfsv3_xdr.dif:

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

Date: Fri, 26 Oct 2007 13:31:57 -0400

NFS: Use unsigned intermediates for manipulating header lengths (NFSv3 XDR)

Clean up: prevent length underflow and mixed sign comparisons when unmarshalling NFS version 3 read, readdir, and readlink replies.

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

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

linux-2.6.24-039-use_unsigned_intermediates_for_manipulating_header_lengths_nfsv4_xdr.dif:

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

Date: Fri, 26 Oct 2007 13:32:03 -0400

NFS: Use unsigned intermediates for manipulating header lengths (NFSv4 XDR)

Clean up: prevent length underflow and mixed sign comparison when unmarshalling NFS version 4 getacl, readdir, and readlink replies.

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

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

linux-2.6.24-040-change_sign_of_some_loop_indices_in_nfs4xdr_c.dif:

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

Date: Fri, 26 Oct 2007 13:32:08 -0400

NFS: Change sign of some loop indices in nfs4xdr.c

Nit: Eliminate some mixed sign comparisons in loop indices.

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

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

linux-2.6.24-041-prevent_nfs_getattr_hang_during_heavy_write_workloads.dif:

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

Date: Fri, 26 Oct 2007 13:32:13 -0400

NFS: Prevent nfs_getattr() hang during heavy write workloads

POSIX requires that ctime and mtime, as reported by the stat(2) call, reflect the activity of the most recent write(2). To that end, nfs_getattr() flushes pending dirty writes to a file before doing a GETATTR to allow the NFS server to set the file's size, ctime, and mtime properly.

However, nfs_getattr() can be starved when a constant stream of application writes to a file prevents nfs_wb_nocommit() from completing. This usually results in hangs of programs doing a stat against an NFS file that is being written. "ls -l" is a common victim of this behavior.

To prevent starvation, hold the file's i_mutex in nfs_getattr() to freeze applications writes temporarily so the client can more quickly obtain clean values for a file's size, mtime, and ctime.

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

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

linux-2.6.24-042-ensure_that_nfs_version_4_mounts_use_nfs_port_if_nfsport_wasn_t_set.dif:

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

Date: Fri, 26 Oct 2007 13:32:19 -0400

NFS: Ensure that NFS version 4 mounts use NFS_PORT if nfsport wasn't set

Text-based mount option parsing introduced a minor regression in the behavior of NFS version 4 mounts. NFS version 4 is not supposed to require a running rpcbind service on the server in order for a mount to succeed.

In other words, if the mount options don't specify a port number, the port number is supposed to default to 2049. For earlier versions of NFS, the default port number was zero in order to cause the RPC client to autobind to the server's NFS service.

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

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

linux-2.6.24-043-remove_support_for_the_nfsprog_option.dif:

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

Date: Fri, 26 Oct 2007 13:32:24 -0400

NFS: Remove support for the 'nfsprog' option

Remove the mount option that allows users to specify an alternate NFS program number. The client hasn't support setting an alternate NFS program number for a very long time.

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

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

linux-2.6.24-044-remove_support_for_the_mountprog_option.dif:

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

Date: Fri, 26 Oct 2007 13:32:29 -0400

NFS: Remove support for the 'mountprog' option

Remove the mount option that allows users to specify an alternate mountd program number. The client hasn't support setting an alternate mountd program number for a very long time.

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

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

linux-2.6.24-045-clean_up_copy_hostname_with_kstrndup_during_mount_processing.dif:

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

Date: Fri, 26 Oct 2007 13:32:40 -0400

NFS: Clean up: copy hostname with kstrndup during mount processing

Clean up: mount option parsing uses kstrndup in several places, rather than using kzalloc. Replace the few remaining uses of kzalloc with kstrndup, for consistency.

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

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

linux-2.6.24-046-clean_up_address_comparison_in_nfs_find_client.dif:

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

Date: Fri, 26 Oct 2007 13:32:45 -0400

NFS: Clean up address comparison in __nfs_find_client()

The address comparison in the __nfs_find_client() function is deceptive. It uses a memcmp() to check a pair of u32 fields for equality. Not only is this inefficient, but usually memcmp() is used for comparing two *whole* sockaddr_in's (which includes comparisons of the address family and port number), so it's easy to mistake the comparison here for a whole sockaddr comparison, which it isn't.

So for clarity and efficiency, we replace the memcmp() with a simple test for equality between the two s_addr fields. This should have no behavioral effect.

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

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

linux-2.6.24-047-rpc_program_information_is_stored_in_unsigned_integers.dif:

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

Date: Fri, 26 Oct 2007 13:32:56 -0400

SUNRPC: RPC program information is stored in unsigned integers

Clean up: When looping over RPC version and procedure numbers, use unsigned index variables.

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

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

linux-2.6.24-048-remove_an_unneeded_check_in_decode_compound_header_arg.dif:

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

Date: Fri, 26 Oct 2007 13:33:01 -0400

NFS: Remove an unneeded check in decode_compound_header_arg()

Clean up: The header tag length is unsigned, so checking that it is less than zero is unnecessary.

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

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

linux-2.6.24-049-cleanup_updates_to_cache_change_attribute.dif:

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

Date: Mon, 15 Oct 2007 18:18:29 -0400

NFS: define a function to update nfsi->cache_change_attribute

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

linux-2.6.24-050-cleanup_nfs_client.dif:

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

Date: Fri, 14 Dec 2007 14:56:04 -0500

NFS: Clean up the nfs_client initialisation

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

linux-2.6.24-051-cleanup_nfs_find_client.dif:

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

Date: Fri, 14 Dec 2007 14:56:05 -0500

NFS: Clean up the nfs_find_client function.

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

linux-2.6.24-052-remove_cl_nfsversion.dif:

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

Date: Fri, 14 Dec 2007 14:56:07 -0500

NFS: Remove the redundant nfs_client->cl_nfsversion

We can get the same information from the rpc_ops structure instead.

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

linux-2.6.24-053-rpc_create_default_hostname_should_support_af_inet6_addresses.dif:

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

Date: Mon, 10 Dec 2007 14:56:24 -0500

SUNRPC: rpc_create() default hostname should support AF_INET6 addresses

If the ULP doesn't pass a hostname string to rpc_create(), it manufactures one based on the passed-in address. Be smart enough to handle an AF_INET6 address properly in this case.

Move the default servername logic before the xprt_create_transport() call to simplify error handling in rpc_create().

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

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

linux-2.6.24-054-fix_socket_address_handling_in_rpcb_clnt.dif:

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

Date: Mon, 10 Dec 2007 14:56:31 -0500

SUNRPC: Fix socket address handling in rpcb_clnt

Make sure rpcb_clnt passes the correct address length to rpc_create().

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

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

linux-2.6.24-055-rpc_version_numbers_are_u32.dif:

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

Date: Mon, 10 Dec 2007 14:56:38 -0500

SUNRPC: RPC version numbers are u32

Clean up: use correct type for RPC version numbers in rpcbind client.

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

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

linux-2.6.24-056-move_universal_address_definitions_to_global_header.dif:

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

Date: Mon, 10 Dec 2007 14:56:46 -0500

SUNRPC: Move universal address definitions to global header

Universal addresses are defined in RFC 1833 and clarified in RFC 3530. We need to use them in several places in the NFS and RPC clients, so move the relevant definition and block comment to an appropriate global include file.

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

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

linux-2.6.24-057-ensure_nfsv4_setclientid_send_buffer_is_large_enough.dif:

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

Date: Mon, 10 Dec 2007 14:56:54 -0500

NFS: Ensure NFSv4 SETCLIENTID send buffer is large enough

Ensure that the RPC buffer size specified for NFSv4 SETCLIENTID procedures matches what we are encoding into the buffer. See the definition of struct nfs4_setclientid {} and the encode_setclientid() function.

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

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

linux-2.6.24-058-increase_size_of_cl_ipaddr_field_to_hold_ipv6_addresses.dif:

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

Date: Mon, 10 Dec 2007 14:57:01 -0500

NFS: Increase size of cl_ipaddr field to hold IPv6 addresses

The nfs_client's cl_ipaddr field needs to be larger to hold strings that represent IPv6 addresses.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Cc: Aurelien Charbon <aurelien.charbon@ext.bull.net>

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

linux-2.6.24-059-enable_nfs_client_to_generate_clientid_strings_with_ipv6_addresses.dif:

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

Date: Mon, 10 Dec 2007 14:57:09 -0500

NFS: Enable NFS client to generate CLIENTID strings with IPv6 addresses

We recently added methods to RPC transports that provide string versions of the remote peer address information. Convert the NFSv4 SETCLIENTID procedure to use those methods instead of building the client ID out of whole cloth.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Cc: Aurelien Charbon <aurelien.charbon@ext.bull.net>

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

linux-2.6.24-060-eliminate_nipquad_clp_cl_addr_sin_addr.dif:

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

Date: Mon, 10 Dec 2007 14:57:16 -0500

NFS: eliminate NIPQUAD(clp->cl_addr.sin_addr)

To ensure the NFS client displays IPv6 addresses properly, replace address family-specific NIPQUAD() invocations with a call to the RPC client to get a formatted string representing the remote peer's address.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Cc: Aurelien Charbon <aurelien.charbon@ext.bull.net>

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

linux-2.6.24-061-move_dprintks_from_callback_c_to_callback_proc_c.dif:

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

Date: Mon, 10 Dec 2007 14:57:23 -0500

NFS: Move dprintks from callback.c to callback_proc.c

Clean up: The client side peer address is available in callback_proc.c, so move a dprintk out of fs/nfs/callback.c and into fs/nfs/callback_proc.c.

This is more consistent with other debugging messages, and the proc routines have more information about each request to display.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Cc: Aurelien Charbon <aurelien.charbon@ext.bull.net>

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

linux-2.6.24-062-address_a_couple_of_nits_in_nfs_follow_referral.dif:

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

Date: Mon, 10 Dec 2007 14:57:31 -0500

NFS: Address a couple of nits in nfs_follow_referral()

Clean up: fix an outdated block comment, and address a comparison between a signed and unsigned integer.

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

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

linux-2.6.24-063-add_support_for_af_inet6_addresses_in_nfs_compare_super.dif:

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

Date: Mon, 10 Dec 2007 14:57:38 -0500

NFS: Add support for AF_INET6 addresses in nfs_compare_super()

Refactor nfs_compare_super() and add AF_INET6 support.

Replace the generic memcmp() to document explicitly what parts of the addresses must match in this check, and make the comparison independent of the lengths of both addresses.

A side benefit is both tests are more computationally efficient than a memcmp().

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

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

linux-2.6.24-064-verify_ipv6_addresses_properly.dif:

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

Date: Mon, 10 Dec 2007 14:57:45 -0500

NFS: Verify IPv6 addresses properly

Add support to nfs_verify_server_address for recognizing AF_INET6 addresses.

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

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

linux-2.6.24-065-make_setting_a_port_number_agostic.dif:

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

Date: Mon, 10 Dec 2007 14:57:53 -0500

NFS: Make setting a port number agostic

We'll need to set the port number of an AF_INET or AF_INET6 address in several places in fs/nfs/super.c, so introduce a helper that can manage this for us. We put this helper to immediate use.

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

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

linux-2.6.24-066-set_default_port_for_nfsv4_with_support_for_af_inet6.dif:

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

Date: Mon, 10 Dec 2007 14:58:00 -0500

NFS: Set default port for NFSv4, with support for AF_INET6

Create a helper function to set the default NFS port for NFSv4 mount points. The helper supports both AF_INET and AF_INET6 family addresses.

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

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

linux-2.6.24-067-add_support_for_af_inet6_addresses_in_nfs_find_client.dif:

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

Date: Thu, 3 Jan 2008 13:28:58 -0500

NFS: Add support for AF_INET6 addresses in __nfs_find_client()

Introduce AF_INET6-specific address checking to __nfs_find_client().

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

linux-2.6.24-068-expand_server_address_storage_in_nfs_client_struct.dif:

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

Date: Mon, 10 Dec 2007 14:58:15 -0500

NFS: Expand server address storage in nfs_client struct

Prepare for managing larger addresses in the NFS client by widening the nfs_client struct's cl_addr field.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Cc: Aurelien Charbon <aurelien.charbon@ext.bull.net>

(Modified to work with the new parameters for nfs_alloc_client)

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

linux-2.6.24-069-change_cb_getattrargs_to_pass_struct_sockaddr_instead_of_sockaddr_in.dif:

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

Date: Mon, 10 Dec 2007 14:58:22 -0500

NFS: Change cb_getattrargs to pass "struct sockaddr *" instead of sockaddr_in

Change the addr field in the cb_getattrargs struct to a "struct sockaddr *" to support non-IPv4 addresses.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Cc: Aurelien Charbon <aurelien.charbon@ext.bull.net>

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

linux-2.6.24-070-change_cb_recallargs_to_pass_struct_sockaddr_instead_of_sockaddr_in.dif:

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

Date: Mon, 10 Dec 2007 14:58:29 -0500

NFS: Change cb_recallargs to pass "struct sockaddr *" instead of sockaddr_in

Change the addr field in the cb_recallargs struct to a "struct sockaddr *" to support non-IPv4 addresses.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Cc: Aurelien Charbon <aurelien.charbon@ext.bull.net>

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

linux-2.6.24-072-change_nfs_find_client_to_take_struct_sockaddr.dif:

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

Date: Mon, 10 Dec 2007 14:58:44 -0500

NFS: Change nfs_find_client() to take "struct sockaddr *"

Adjust arguments and callers of nfs_find_client() to pass a "struct sockaddr *" instead of "struct sockaddr_in *" to support non-IPv4 addresses.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Cc: Aurelien Charbon <aurelien.charbon@ext.bull.net>

Trond: Also fix up protocol version number argument in nfs_find_client() to use the correct u32 type.

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

linux-2.6.24-073-change_nfs_get_client_to_take_sockaddr.dif:

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

Date: Mon, 10 Dec 2007 14:58:51 -0500

NFS: Change nfs_get_client() to take sockaddr *

Adjust arguments and callers of nfs_get_client() to pass a "struct sockaddr *" instead of "struct sockaddr_in *" to support non-IPv4 addresses.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Cc: Aurelien Charbon <aurelien.charbon@ext.bull.net>

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

linux-2.6.24-074-change_nfs4_set_client_to_accept_struct_sockaddr.dif:

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

Date: Mon, 10 Dec 2007 14:58:59 -0500

NFS: Change nfs4_set_client() to accept struct sockaddr *

Adjust the arguments and callers of nfs4_set_client() to pass a "struct sockaddr *" instead of a "struct sockaddr_in *" to support non-IPv4 addresses in the NFS client.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Cc: Aurelien Charbon <aurelien.charbon@ext.bull.net>

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

linux-2.6.24-075-adjust_nfs_clone_mount_structure_to_store_struct_sockaddr.dif:

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

Date: Mon, 10 Dec 2007 14:59:06 -0500

NFS: Adjust nfs_clone_mount structure to store "struct sockaddr *"

Change the addr field in the nfs_clone_mount structure to store a "struct sockaddr *" to support non-IPv4 addresses in the NFS client.

Note this is mostly a cosmetic change, and does not actually allow referrals using IPv6 addresses. The existing referral code assumes that the server returns a string that represents an IPv4 address. This code needs to support hostnames and IPv6 addresses as well as IPv4 addresses, thus it will need to be reorganized completely (to handle DNS resolution in user space).

Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Cc: Aurelien Charbon <aurelien.charbon@ext.bull.net>

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

linux-2.6.24-076-remove_the_nipquad_from_nfs_try_mount.dif:

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

Date: Mon, 10 Dec 2007 14:59:13 -0500

NFS: Remove the NIPQUAD from nfs_try_mount

In the name of address family compatibility, we can't have the NIP_FMT and NIPQUAD macros in nfs_try_mount(). Instead, we can make use of an unused mount option to display the mount server's hostname.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Cc: Aurelien Charbon <aurelien.charbon@ext.bull.net>

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

linux-2.6.24-077-refactor_mount_option_address_parsing_into_separate_function.dif:

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

Date: Mon, 10 Dec 2007 14:59:21 -0500

NFS: Refactor mount option address parsing into separate function

Refactor the logic to parse incoming text-based IP addresses. Use the in4_pton() function instead of the older in_aton(), following the lead of the in-kernel CIFS client.

Later we'll add IPv6 address parsing using the matching in6_pton() function. For now we can't allow IPv6 address parsing: we must expand the size of the address storage fields in the nfs_parsed_mount_options struct before we can parse and store IPv6 addresses.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Cc: Aurelien Charbon <aurelien.charbon@ext.bull.net>

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

linux-2.6.24-078-support_non_ipv4_addresses_in_nfs_parsed_mount_data.dif:

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

Date: Mon, 10 Dec 2007 14:59:28 -0500

NFS: Support non-IPv4 addresses in nfs_parsed_mount_data

Replace the nfs_server and mount_server address fields in the nfs_parsed_mount_data structure with a "struct sockaddr_storage" instead of a "struct sockaddr_in".

Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Cc: Aurelien Charbon <aurelien.charbon@ext.bull.net>

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

linux-2.6.24-079-pull_covers_off_ipv6_address_parsing.dif:

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

Date: Mon, 10 Dec 2007 14:59:35 -0500

NFS: Pull covers off IPv6 address parsing

Now that the needed IPv6 infrastructure is in place, allow the NFS client's IP address parser to generate AF_INET6 addresses.

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

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

linux-2.6.24-080-add_proto_to_setclientid_args.dif:

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

Date: Fri, 14 Dec 2007 14:56:07 -0500

NFSv4: Add socket proto argument to setclientid

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

linux-2.6.24-081-cleanup_rpc_new_client.dif:

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

Date: Thu, 20 Dec 2007 16:03:53 -0500

SUNRPC: cleanup for rpc_new_client()

There is no reason why we shouldn't just pass the rpc_create_args.

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

linux-2.6.24-082-cleanup_init_xprt_timeouts.dif:

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

Date: Thu, 20 Dec 2007 16:03:54 -0500

SUNRPC: Clean up the transport timeout initialisation

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

linux-2.6.24-083-per_rpcclient_timeouts.dif:

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

Date: Thu, 20 Dec 2007 16:03:55 -0500

SUNRPC: Add support for per-client timeout values

In order to be able to support setting the timeo and retrans parameters on a per-mountpoint basis, we move the rpc_timeout structure into the rpc_clnt.

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

linux-2.6.24-084-fix_nfs_init_timeout_values.dif:

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

Date: Thu, 20 Dec 2007 16:03:57 -0500

NFS: Ensure that we respect NFS_MAX_TCP_TIMEOUT

It isn't sufficient just to limit timeout->to_initval, we also need to limit to_maxval.

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

linux-2.6.24-085-per_mountpoint_timeout_values.dif:

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

Date: Thu, 20 Dec 2007 16:03:59 -0500

NFS: Support per-mountpoint timeout parameters.

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

linux-2.6.24-086-per_mountpoint_proto.dif:

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

Date: Thu, 3 Jan 2008 16:29:06 -0500

NFS: Fix the 'proto=' mount option

Currently, if you have a server mounted using networking protocol, you cannot specify a different value using the 'proto=' option on another mountpoint.

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

linux-2.6.24-087-fix_use_of_copy_to_user_in_gss_pipe_upcall.dif:

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

Date: Thu, 20 Dec 2007 14:54:27 -0500

SUNRPC: Fix use of copy_to_user() in gss_pipe_upcall()

The gss_pipe_upcall() function expects the copy_to_user() function to return a negative error value if the call fails, but copy_to_user() returns an unsigned long number of bytes that couldn't be copied.

Can rpc_pipefs actually retry a partially completed upcall read? If not, then gss_pipe_upcall() should punt any partial read, just like the upcall logic in net/sunrpc/cache.c.

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

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

linux-2.6.24-088-clean_up_fs_nfs_idmap_c.dif:

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

Date: Thu, 20 Dec 2007 14:54:35 -0500

NFS: Clean up fs/nfs/idmap.c

Clean up white space damage and use standard kernel coding conventions for return statements.

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

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

linux-2.6.24-089-fix_use_of_copy_to_user_in_idmap_pipe_upcall.dif:

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

Date: Thu, 20 Dec 2007 14:54:42 -0500

NFS: Fix use of copy_to_user() in idmap_pipe_upcall

The idmap_pipe_upcall() function expects the copy_to_user() function to return a negative error value if the call fails, but copy_to_user() returns an unsigned long number of bytes that couldn't be copied.

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

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

linux-2.6.24-090-use_size_t_for_storing_name_lengths.dif:

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

Date: Thu, 20 Dec 2007 14:54:49 -0500

NFS: Use size_t for storing name lengths

Clean up: always use the same type when handling buffer lengths. As a bonus, this prevents a mixed sign comparison in idmap_lookup_name.

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

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

linux-2.6.24-091-fix_minor_mixed_sign_comparison_in_nfs_client_s_write_logic.dif:

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

Date: Thu, 20 Dec 2007 14:54:57 -0500

NFS: Fix minor mixed sign comparison in NFS client's write logic

Clean up: PAGE_CACHE_SIZE is unsigned, and nfs_pageio_init() takes a size_t.

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

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

linux-2.6.24-092-nfs_write_end_clean_up.dif:

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

Date: Thu, 20 Dec 2007 14:55:04 -0500

NFS: nfs_write_end clean up

Clean up: commit 4899f9c8 added nfs_write_end(), which introduces a conditional expression that returns an unsigned integer in one arm and a signed integer in the other.

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

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

linux-2.6.24-093-eliminate_harmless_mixed_sign_comparison_in_nlmdbg_cookie2a.dif:

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

Date: Thu, 20 Dec 2007 14:55:11 -0500

lockd: Eliminate harmless mixed sign comparison in nlmdbg_cookie2a()

The cookie->len field is unsigned, so the loop index variable in nlmdbg_cookie2a() should also be unsigned.

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

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

linux-2.6.24-094-sunrpc_fewer_conditionals_in_format_ip_address.dif:

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

Date: Mon, 07 Jan 2008 18:34:48 -0500

SUNRPC: fewer conditionals in the format_ip_address routines

Clean up: have the set up routines explicitly pass the strings to be used for the transport name and NETID. This removes a number of conditionals and dependencies on rpc_xprt.prot, which is overloaded.

Tighten up type checking on the address_strings array while we're at it.

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

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

linux-2.6.24-095-fixup_const_declarations_in_rpcb_clnt.dif:

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

Date: Mon, 7 Jan 2008 21:16:56 -0500

SUNRPC: Fix up constant string declarations in struct rpcbind_args

...and eliminate an unnecessary cast.

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

linux-2.6.24-096-introduce_external_nlm_host_set_up_and_tear_down_functions.dif:

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

Date: Fri, 11 Jan 2008 17:09:44 -0500

NLM: Introduce external nlm_host set-up and tear-down functions

We would like to remove the per-lock-operation nlm_lookup_host() call from nlmclnt_proc().

The new architecture pins an nlm_host structure to each NFS client superblock that has the "lock" mount option set. The NFS client passes in the pinned nlm_host structure during each call to nlmclnt_proc(). NFS client unmount processing "puts" the nlm_host so it can be garbage- collected later.

This patch introduces externally callable NLM functions that handle mount-time nlm_host set up and tear-down.

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

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

linux-2.6.24-097-invoke_nlmclnt_init_during_nfs_mount_processing.dif:

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

Date: Fri, 11 Jan 2008 17:09:52 -0500

NFS: Invoke nlmclnt_init during NFS mount processing

Cache an appropriate nlm_host structure in the NFS client's mount point metadata for later use.

Note that there is no need to set NFS_MOUNT_NONLM in the error case -- if nfs_start_lockd() returns a non-zero value, its callers ensure that the mount request fails outright.

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

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

linux-2.6.24-098-nlm_nfs_use_cached_nlm_host_when_calling_nlmclnt_proc.dif:

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

Date: Fri, 11 Jan 2008 17:09:59 -0500

NLM/NFS: Use cached nlm_host when calling nlmclnt_proc()

Now that each NFS mount point caches its own nlm_host structure, it can be passed to nlmclnt_proc() for each lock request. By pinning an nlm_host for each mount point, we trade the overhead of looking up or creating a fresh nlm_host struct during every NLM procedure call for a little extra memory.

We also restrict the nlmclnt_proc symbol to limit the use of this call to in-tree modules.

Note that nlm_lookup_host() (just removed from the client's per-request NLM processing) could also trigger an nlm_host garbage collection. Now client-side nlm_host garbage collection occurs only during NFS mount processing. Since the NFS client now holds a reference on these nlm_host structures, they wouldn't have been affected by garbage collection anyway.

Given that nlm_lookup_host() reorders the global nlm_host chain after every successful lookup, and that a garbage collection could be triggered during the call, we've removed a significant amount of per-NLM-request CPU processing overhead.

Sidebar: there are only a few remaining references to the internals of NFS inodes in the client-side NLM code. The only references I found are related to extracting or comparing the inode's file handle via NFS_FH(). One is in nlmclnt_grant(); the other is in nlmclnt_setlockargs().

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

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

linux-2.6.24-099-change_nlmclnt_init_parameters.dif:

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

Date: Tue, 15 Jan 2008 16:04:20 -0500

NLM: Introduce an arguments structure for nlmclnt_init()

Clean up: pass 5 arguments to nlmclnt_init() in a structure similar to the new nfs_client_initdata structure.

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

linux-2.6.24-100-lockd_fix_bogus_return_in_nlmclnt_rpc_release.dif:

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

Date: Fri, 11 Jan 2008 17:41:29 -0500

NLM: Fix a bogus 'return' in nlmclnt_rpc_release

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

linux-2.6.24-101-nfs_version_number_is_unsigned.dif:

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

Date: Mon, 14 Jan 2008 12:32:05 -0500

NFS: NFS version number is unsigned

RPC protocol version numbers are unsigned.

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

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

linux-2.6.24-102-clean_up_functions_that_free_address_strings_array.dif:

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

Date: Mon, 14 Jan 2008 12:32:20 -0500

SUNRPC: Clean up functions that free address_strings array

Clean up: document the rule (kfree) and the exceptions (RPC_DISPLAY_PROTO and RPC_DISPLAY_NETID) when freeing the objects in a transport's address_strings array.

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

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

linux-2.6.24-103-rpcb_getport_sync_should_use_built_in_hostname_generator.dif:

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

Date: Mon, 14 Jan 2008 15:11:46 -0500

SUNRPC: rpcb_getport_sync() should use built-in hostname generator

rpc_create() can already fill in the hostname with a string representation of the server's IP address, so remove redundant logic in in rpcb_getport_sync() that does that.

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

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

linux-2.6.24-104-use_appropriate_argument_types_in_rpcb_client.dif:

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

Date: Mon, 14 Jan 2008 15:11:53 -0500

SUNRPC: Use appropriate argument types in rpcb client

Clean up: Follow recommendations of Chapter 5 of Documentation/CodingStyle and use "u32" instead of "__u32" for types in definitions that are not shared with user space.

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

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

linux-2.6.24-105-clean_up_block_comment_preceding_rpcb_getport_sync.dif:

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

Date: Mon, 14 Jan 2008 15:12:01 -0500

SUNRPC: Clean up block comment preceding rpcb_getport_sync()

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

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

linux-2.6.24-106-rpcb_getport_sync_passes_incorrect_address_size_to_rpc_create.dif:

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

Date: Mon, 14 Jan 2008 15:12:08 -0500

SUNRPC: rpcb_getport_sync() passes incorrect address size to rpc_create()

The variable "sin" is a pointer, so sizeof(sin) is the size of a pointer, not the size of thing that sin points to.

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

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

linux-2.6.24-107-dont_rpc_sigmask_for_async_rpc_calls.dif:

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

Date: Tue, 15 Jan 2008 14:17:11 -0500

SUNRPC: Don't bother changing the sigmask for asynchronous RPC calls

The caller will never sleep in rpc_execute, so don't bother setting the sigmask.

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

linux-2.6.24-108-optimise_away_sigmask_in_async_odirect.dif:

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

Date: Tue, 15 Jan 2008 14:17:12 -0500

NFS: Optimise away the sigmask code in aio/dio reads and writes

There are no interruptible waits for asynchronous RPC tasks, so we don't need to wrap calls to rpc_run_task() with an rpc_clnt_sigmask/rpc_clnt_unsigmask pair.

Instead we can wrap the wait_for_completion_interruptible() in nfs_direct_wait(). This means that we completely optimise away sigmask setting for the case of non-blocking aio/dio.

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

linux-2.6.24-109-allow_nfsv4_acls_on_non_regular_files.dif:

From: J. Bruce Fields <bfields@citi.umich.edu>

Date: Tue, 15 Jan 2008 16:43:19 -0500

nfs4: allow nfsv4 acls on non-regular-files

The rfc doesn't give any reason it shouldn't be possible to set an attribute on a non-regular file. And if the server supports it, then it shouldn't be up to us to prevent it.

Thanks to Erez for the report and Trond for further analysis.

Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu> Tested-by: Erez Zadok <ezk@cs.sunysb.edu>

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

linux-2.6.24-NFS_ALL.dif:

All of the above

[ICO]NameLast modifiedSizeDescription

[PARENTDIR]Parent Directory   -  
[DIR]all/ 2008-11-01 17:29 -  
[DIR]devel/ 2008-11-01 17:30 -  
[DIR]for_bruce/ 2008-11-01 17:29 -  
[TXT]linux-2.6.24-001-cle..>2008-01-16 14:09 5.3K 
[TXT]linux-2.6.24-002-fix..>2008-01-02 22:11 4.3K 
[TXT]linux-2.6.24-003-sun..>2008-01-02 22:11 2.7K 
[TXT]linux-2.6.24-004-sun..>2008-01-02 22:11 4.1K 
[TXT]linux-2.6.24-005-sun..>2008-01-02 22:11 2.3K 
[TXT]linux-2.6.24-006-sun..>2008-01-02 22:11 1.0K 
[TXT]linux-2.6.24-007-sun..>2008-01-02 22:11 3.1K 
[TXT]linux-2.6.24-008-sun..>2008-01-02 22:11 1.7K 
[TXT]linux-2.6.24-009-sun..>2008-01-02 22:11 1.7K 
[TXT]linux-2.6.24-010-sun..>2008-01-02 22:11 3.4K 
[TXT]linux-2.6.24-011-tcp..>2008-01-02 22:11 1.6K 
[TXT]linux-2.6.24-012-rpc..>2007-11-12 20:27 3.4K 
[TXT]linux-2.6.24-013-mov..>2008-01-02 22:11 15K 
[TXT]linux-2.6.24-014-mov..>2007-11-06 23:47 9.5K 
[TXT]linux-2.6.24-015-res..>2008-01-02 22:11 12K 
[TXT]linux-2.6.24-016-cle..>2008-01-02 22:11 15K 
[TXT]linux-2.6.24-017-cle..>2008-01-14 23:49 10K 
[TXT]linux-2.6.24-018-cle..>2008-01-14 23:49 11K 
[TXT]linux-2.6.24-019-mas..>2007-11-06 23:47 2.6K 
[TXT]linux-2.6.24-020-add..>2008-01-02 22:11 1.4K 
[TXT]linux-2.6.24-021-mak..>2008-01-14 23:49 1.7K 
[TXT]linux-2.6.24-022-cle..>2008-01-14 23:49 21K 
[TXT]linux-2.6.24-023-con..>2008-01-14 23:49 15K 
[TXT]linux-2.6.24-024-rem..>2007-11-06 23:47 1.7K 
[TXT]linux-2.6.24-025-all..>2008-01-14 23:49 1.5K 
[TXT]linux-2.6.24-026-con..>2008-01-14 23:49 8.6K 
[TXT]linux-2.6.24-027-une..>2008-01-14 23:49 1.8K 
[TXT]linux-2.6.24-028-rem..>2008-01-14 23:49 1.0K 
[TXT]linux-2.6.24-029-rem..>2007-11-06 23:47 1.3K 
[TXT]linux-2.6.24-030-pre..>2008-01-02 22:11 1.8K 
[TXT]linux-2.6.24-031-fix..>2008-01-02 22:11 1.1K 
[TXT]linux-2.6.24-032-che..>2007-11-06 23:47 1.1K 
[TXT]linux-2.6.24-033-tem..>2007-11-06 23:47 890  
[TXT]linux-2.6.24-034-rem..>2007-11-12 20:27 1.0K 
[TXT]linux-2.6.24-035-fix..>2007-11-06 23:47 812  
[TXT]linux-2.6.24-036-ens..>2007-11-06 23:47 1.2K 
[TXT]linux-2.6.24-037-use..>2007-11-06 23:47 3.6K 
[TXT]linux-2.6.24-038-use..>2007-11-06 23:47 4.6K 
[TXT]linux-2.6.24-039-use..>2007-11-06 23:47 2.1K 
[TXT]linux-2.6.24-040-cha..>2007-11-06 23:47 1.9K 
[TXT]linux-2.6.24-041-pre..>2007-11-06 23:47 1.9K 
[TXT]linux-2.6.24-042-ens..>2008-01-02 22:11 1.3K 
[TXT]linux-2.6.24-043-rem..>2008-01-02 22:11 2.5K 
[TXT]linux-2.6.24-044-rem..>2008-01-02 22:11 2.1K 
[TXT]linux-2.6.24-045-cle..>2008-01-02 22:11 1.6K 
[TXT]linux-2.6.24-046-cle..>2008-01-02 22:11 1.4K 
[TXT]linux-2.6.24-047-rpc..>2007-11-06 23:47 1.8K 
[TXT]linux-2.6.24-048-rem..>2007-11-06 23:47 1.0K 
[TXT]linux-2.6.24-049-cle..>2008-01-14 23:49 3.5K 
[TXT]linux-2.6.24-050-cle..>2008-01-02 22:11 4.3K 
[TXT]linux-2.6.24-051-cle..>2008-01-02 22:11 3.0K 
[TXT]linux-2.6.24-052-rem..>2008-01-14 23:49 7.0K 
[TXT]linux-2.6.24-053-rpc..>2008-01-14 23:49 2.4K 
[TXT]linux-2.6.24-054-fix..>2008-01-14 23:49 2.9K 
[TXT]linux-2.6.24-055-rpc..>2008-01-14 23:49 1.2K 
[TXT]linux-2.6.24-056-mov..>2008-01-14 23:49 5.3K 
[TXT]linux-2.6.24-057-ens..>2008-01-14 23:49 2.2K 
[TXT]linux-2.6.24-058-inc..>2008-01-14 23:49 925  
[TXT]linux-2.6.24-059-ena..>2008-01-14 23:49 1.7K 
[TXT]linux-2.6.24-060-eli..>2008-01-14 23:49 4.4K 
[TXT]linux-2.6.24-061-mov..>2008-01-14 23:49 2.6K 
[TXT]linux-2.6.24-062-add..>2008-01-14 23:49 1.4K 
[TXT]linux-2.6.24-063-add..>2008-01-16 14:09 2.5K 
[TXT]linux-2.6.24-064-ver..>2008-01-14 23:49 1.3K 
[TXT]linux-2.6.24-065-mak..>2008-01-14 23:49 2.3K 
[TXT]linux-2.6.24-066-set..>2008-01-14 23:49 2.3K 
[TXT]linux-2.6.24-067-add..>2008-01-14 23:49 2.9K 
[TXT]linux-2.6.24-068-exp..>2008-01-14 23:49 2.9K 
[TXT]linux-2.6.24-069-cha..>2008-01-14 23:49 1.8K 
[TXT]linux-2.6.24-070-cha..>2008-01-14 23:49 1.7K 
[TXT]linux-2.6.24-072-cha..>2008-01-16 14:09 3.3K 
[TXT]linux-2.6.24-073-cha..>2008-01-16 14:09 1.9K 
[TXT]linux-2.6.24-074-cha..>2008-01-16 14:09 2.4K 
[TXT]linux-2.6.24-075-adj..>2008-01-16 14:09 2.9K 
[TXT]linux-2.6.24-076-rem..>2008-01-14 23:49 3.0K 
[TXT]linux-2.6.24-077-ref..>2008-01-14 23:49 2.4K 
[TXT]linux-2.6.24-078-sup..>2008-01-16 14:09 6.5K 
[TXT]linux-2.6.24-079-pul..>2008-01-14 23:49 1.4K 
[TXT]linux-2.6.24-080-add..>2008-01-14 23:49 1.4K 
[TXT]linux-2.6.24-081-cle..>2008-01-14 23:49 3.0K 
[TXT]linux-2.6.24-082-cle..>2008-01-02 22:11 4.7K 
[TXT]linux-2.6.24-083-per..>2008-01-14 23:49 7.4K 
[TXT]linux-2.6.24-084-fix..>2008-01-16 14:09 1.1K 
[TXT]linux-2.6.24-085-per..>2008-01-16 14:09 9.1K 
[TXT]linux-2.6.24-086-per..>2008-01-16 14:09 4.1K 
[TXT]linux-2.6.24-087-fix..>2008-01-14 23:49 1.4K 
[TXT]linux-2.6.24-088-cle..>2008-01-14 23:49 5.7K 
[TXT]linux-2.6.24-089-fix..>2008-01-14 23:49 1.2K 
[TXT]linux-2.6.24-090-use..>2008-01-14 23:49 1.4K 
[TXT]linux-2.6.24-091-fix..>2008-01-14 23:49 934  
[TXT]linux-2.6.24-092-nfs..>2008-01-14 23:49 906  
[TXT]linux-2.6.24-093-eli..>2008-01-14 23:49 854  
[TXT]linux-2.6.24-094-sun..>2008-01-14 23:49 7.3K 
[TXT]linux-2.6.24-095-fix..>2008-01-14 23:49 1.4K 
[TXT]linux-2.6.24-096-int..>2008-01-14 23:49 3.1K 
[TXT]linux-2.6.24-097-inv..>2008-01-16 14:09 2.8K 
[TXT]linux-2.6.24-098-nlm..>2008-01-14 23:49 5.0K 
[TXT]linux-2.6.24-099-cha..>2008-01-16 14:09 4.0K 
[TXT]linux-2.6.24-100-loc..>2008-01-14 23:49 658  
[TXT]linux-2.6.24-101-nfs..>2008-01-14 23:49 855  
[TXT]linux-2.6.24-102-cle..>2008-01-14 23:49 2.3K 
[TXT]linux-2.6.24-103-rpc..>2008-01-14 23:49 1.2K 
[TXT]linux-2.6.24-104-use..>2008-01-14 23:49 1.6K 
[TXT]linux-2.6.24-105-cle..>2008-01-14 23:49 1.1K 
[TXT]linux-2.6.24-106-rpc..>2008-01-14 23:49 966  
[TXT]linux-2.6.24-107-don..>2008-01-16 14:09 1.0K 
[TXT]linux-2.6.24-108-opt..>2008-01-16 14:09 2.7K 
[TXT]linux-2.6.24-109-all..>2008-01-16 14:09 1.1K 
[TXT]linux-2.6.24-NFS_ALL..>2008-01-16 14:10 208K 
[   ]series 2008-01-16 14:09 6.7K 

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