NFS client patches for Linux 2.6.23-rc3

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

linux-2.6.23-001-add_nfs_page_mkwrite.dif:

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

Date: Sun, 22 Jul 2007 17:09:05 -0400

NFS: Add the helper nfs_vm_page_mkwrite

This is needed in order to set up a proper nfs_page request for mmapped files.

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

linux-2.6.23-002-clean_up_write.dif:

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

Date: Sun, 22 Jul 2007 17:09:05 -0400

NFS: Clean up write code...

The addition of nfs_page_mkwrite means that We should no longer need to create requests inside nfs_writepage()

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

linux-2.6.23-003-cleanup_nfs_writepages.dif:

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

Date: Sun, 22 Jul 2007 19:27:32 -0400

NFS: Clean up nfs_writepages()

Just call write_cache_pages directly instead of hacking the writeback control structure in order to find out if we were called from writepages() or directly from the VM.

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

linux-2.6.23-004-remove_wbc_fs_private.dif:

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

Date: Sun, 22 Jul 2007 19:27:46 -0400

VFS: Remove writeback_control->fs_private

The only user of this field was NFS.

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

linux-2.6.23-005-add_nfs_wb_nocommit.dif:

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

Date: Fri, 20 Jul 2007 13:13:28 -0400

NFS: Clean up NFS writeback flush code

The only user of nfs_sync_mapping_range() is nfs_getattr(), which uses it to flush out the entire inode without sending a commit. We therefore replace nfs_sync_mapping_range with a more appropriate helper.

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

linux-2.6.23-006-optimise_writeback.dif:

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

Date: Wed, 25 Jul 2007 14:09:54 -0400

NFS: Writeback optimisation

Schedule writes using WB_SYNC_NONE first, then come back for a second pass using WB_SYNC_ALL.

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

linux-2.6.23-007-osync_on_error.dif:

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

Date: Wed, 25 Jul 2007 14:09:54 -0400

NFS: Fall back to synchronous writes when a background write errors...

This helps prevent huge queues of background writes from building up whenever the server runs out of disk or quota space, or if someone changes the file access modes behind our backs.

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

linux-2.6.23-008-fs_locks_remove_shadowed_variable.dif:

From: \"J. Bruce Fields\" <bfields@fieldses.org>

Date: Thu, 5 Jul 2007 13:55:09 -0400

locks: kill redundant local variable

There's no need for another variable local to this loop; we can use the variable (of the same name!) already declared at the top of the function, and not used till later (at which point it's initialized, so this is safe).

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

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

linux-2.6.23-009-convert_rpc_pipefs_to_fsnotify.dif:

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

Date: Thu, 7 Jun 2007 22:44:34 -0400

SUNRPC: Convert rpc_pipefs to use the generic filesystem notification hooks

This will allow rpc.gssd to use inotify instead of dnotify in order to locate new rpc upcall pipes.

This also requires the exporting of __audit_inode_child(), which is used by fsnotify_create() and fsnotify_mkdir(). Ccing David Woodhouse.

Cc: David Woodhouse <dwmw2@infradead.org>

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

linux-2.6.23-010-nfs_64_bit_ino_support.dif:

From: Peter Staubach <staubach@redhat.com>

Date: Fri, 03 Aug 2007 15:07:10 -0400

64 bit ino support for NFS client

Hi.

Attached is a patch to modify the NFS client code to support 64 bit ino's, as appropriate for the system and the NFS protocol version.

The code basically just expand the NFS interfaces for routines which handle ino's from using ino_t to u64 and then uses the fileid in the nfs_inode instead of i_ino in the inode. The code paths that were updated are in the getattr method and the readdir methods.

This should be no real change on 64 bit platforms. Since the ino_t is an unsigned long, it would already be 64 bits wide.

Thanx...

ps

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

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

linux-2.6.23-011-nfs_attribute_timeout_handling.dif:

From: Fabio Olive Leite <fleite@redhat.com>

Date: Thu, 26 Jul 2007 22:59:00 -0300

Re: [NFS] [PATCH] Attribute timeout handling and wrapping u32 jiffies

I would like to discuss the idea that the current checks for attribute timeout using time_after are inadequate for 32bit architectures, since time_after works correctly only when the two timestamps being compared are within 2^31 jiffies of each other. The signed overflow caused by comparing values more than 2^31 jiffies apart will flip the result, causing incorrect assumptions of validity.

2^31 jiffies is a fairly large period of time (~25 days) when compared to the lifetime of most kernel data structures, but for long lived NFS mounts that can sit idle for months (think that for some reason autofs cannot be used), it is easy to compare inode attribute timestamps with very disparate or even bogus values (as in when jiffies have wrapped many times, where the comparison doesn't even make sense).

Currently the code tests for attribute timeout by simply adding the desired amount of jiffies to the stored timestamp and comparing that with the current timestamp of obtained attribute data with time_after. This is incorrect, as it returns true for the desired timeout period and another full 2^31 range of jiffies.

In testing with artificial jumps (several small jumps, not one big crank) of the jiffies I was able to reproduce a problem found in a server with very long lived NFS mounts, where attributes would not be refreshed even after touching files and directories in the server:

Initial uptime: 03:42:01 up 6 min, 0 users, load average: 0.01, 0.12, 0.07

NFS volume is mounted and time is advanced: 03:38:09 up 25 days, 2 min, 0 users, load average: 1.22, 1.05, 1.08

# ls -l /local/A/foo/bar /nfs/A/foo/bar -rw-r--r-- 1 root root 0 Dec 17 03:38 /local/A/foo/bar -rw-r--r-- 1 root root 0 Nov 22 00:36 /nfs/A/foo/bar

# touch /local/A/foo/bar

# ls -l /local/A/foo/bar /nfs/A/foo/bar -rw-r--r-- 1 root root 0 Dec 17 03:47 /local/A/foo/bar -rw-r--r-- 1 root root 0 Nov 22 00:36 /nfs/A/foo/bar

We can see the local mtime is updated, but the NFS mount still shows the old value. The patch below makes it work:

Initial setup... 07:11:02 up 25 days, 1 min, 0 users, load average: 0.15, 0.03, 0.04

# ls -l /local/A/foo/bar /nfs/A/foo/bar -rw-r--r-- 1 root root 0 Jan 11 07:11 /local/A/foo/bar -rw-r--r-- 1 root root 0 Jan 11 07:11 /nfs/A/foo/bar

# touch /local/A/foo/bar

# ls -l /local/A/foo/bar /nfs/A/foo/bar -rw-r--r-- 1 root root 0 Jan 11 07:14 /local/A/foo/bar -rw-r--r-- 1 root root 0 Jan 11 07:14 /nfs/A/foo/bar

Signed-off-by: Fabio Olive Leite <fleite@redhat.com>

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

linux-2.6.23-012-nfs_tiny_makefile_cleanup.dif:

From: Christoph Hellwig <hch@lst.de>

Date: Fri, 3 Aug 2007 16:20:32 +0200

[NFS] [PATCH] nfs: tiny makefile cleanup

no need to set up foo-objs these days.

Signed-off-by: Christoph Hellwig <hch@lst.de>

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

linux-2.6.23-013-show_addr_as_ipaddr.dif:

From: Jeff Layton <jlayton@redhat.com>

Date: Mon, 30 Jul 2007 08:47:38 -0400

[NFS] [PATCH] NFS: show addr=ipaddr in /proc/mounts rather than

A minor thing, but useful when working with a server with multiple addrs. This looks like it might also be necessary if Miklos' effort to eliminate /etc/mtab ever comes to fruition.

When displaying mount options in /proc/mounts, the kernel prints "addr=hostname". This info is redundant since we already have the hostname displayed as part of the "device" section of the mount. This patch changes it to display the IP address to which the socket is connected.

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

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

linux-2.6.23-014-fix_a_signed_v_unsigned_comparison_in_rpcbind_s_xdr_routines.dif:

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

Date: Mon, 06 Aug 2007 11:56:31 -0400

SUNRPC: Fix a signed v. unsigned comparison in rpcbind's XDR routines

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

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

linux-2.6.23-015-fix_a_signed_v_unsigned_comparison_in_net_sunrpc_xprtsock_c.dif:

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

Date: Mon, 06 Aug 2007 11:56:42 -0400

SUNRPC: Fix a signed v. unsigned comparison in net/sunrpc/xprtsock.c

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

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

linux-2.6.23-016-use_standard_macros_for_printing_ip_addresses.dif:

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

Date: Mon, 06 Aug 2007 11:56:52 -0400

SUNRPC: Use standard macros for printing IP addresses

include/linux/kernel.h gives us some nice macros for formatting IP addresses. Use them.

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

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

linux-2.6.23-017-free_address_buffers_in_a_loop.dif:

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

Date: Mon, 06 Aug 2007 11:56:57 -0400

SUNRPC: Free address buffers in a loop

Use more generic logic to free buffers holding formatted addresses. This makes it less likely a bug will be introduced when adding additional buffer types in xs_format_peer_address().

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

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

linux-2.6.23-018-add_hex_formatted_address_support_to_rpc_peeraddr2str.dif:

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

Date: Mon, 06 Aug 2007 11:57:02 -0400

SUNRPC: Add hex-formatted address support to rpc_peeraddr2str()

Add support for the NFS client's need to export volume information with IP addresses formatted in hex instead of decimal.

This isn't used yet, but subsequent patches (not in this series) will change the NFS client to use this functionality.

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

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

linux-2.6.23-019-rename_xs_format_peer_addresses.dif:

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

Date: Mon, 06 Aug 2007 11:57:07 -0400

SUNRPC: Rename xs_format_peer_addresses

Prepare to add an IPv6 version of xs_format_peer_addresses by renaming it to xs_format_ipv4_peer_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.23-020-add_a_function_to_format_ipv6_addresses.dif:

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

Date: Mon, 06 Aug 2007 11:57:12 -0400

SUNRPC: add a function to format IPv6 addresses

Clone xs_format_ipv4_peer_addresses into an IPv6 version.

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.23-021-add_support_for_ipv6_to_the_kernel_s_rpcbind_client.dif:

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

Date: Mon, 06 Aug 2007 11:57:18 -0400

SUNRPC: add support for IPv6 to the kernel's rpcbind client

Prepare for adding IPv6 support to the RPC client by adding IPv6 capabilities to rpcbind. Note that this is support on the query side only; registering IPv6 addresses with the local portmapper will come later.

Note we have to take care not to fall back to using version 2 of the rpcbind protocol if we're dealing with IPv6 address. Version 2 doesn't support IPv6 at all.

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.23-022-introduce_support_for_setting_the_port_number_in_ipv6_addresses.dif:

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

Date: Mon, 06 Aug 2007 11:57:23 -0400

SUNRPC: Introduce support for setting the port number in IPv6 addresses

We could clone xs_set_port, but this is easier overall.

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.23-023-rename_xs_bind_to_prepare_for_ipv6_specific_bind_method.dif:

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

Date: Mon, 06 Aug 2007 11:57:28 -0400

SUNRPC: Rename xs_bind() to prepare for IPv6-specific bind method

Prepare for introduction of IPv6-specific socket bind function.

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

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

linux-2.6.23-024-create_an_ipv6_savvy_mechanism_for_binding_to_a_reserved_port.dif:

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

Date: Mon, 06 Aug 2007 11:57:33 -0400

SUNRPC: create an IPv6-savvy mechanism for binding to a reserved port

Clone xs_bindresvport into two functions, one that can handle IPv4 addresses, and one that can handle 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.23-025-refactor_a_part_of_socket_connect_logic_into_a_helper_function.dif:

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

Date: Mon, 06 Aug 2007 11:57:38 -0400

SUNRPC: Refactor a part of socket connect logic into a helper function

Finishing a socket connect is the same for IPv4 and IPv6, so split it out into a helper.

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.23-026-rename_ipv4_connect_workers.dif:

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

Date: Mon, 06 Aug 2007 11:57:43 -0400

SUNRPC: Rename IPv4 connect workers

Prepare for introduction of IPv6 versions of same.

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

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

linux-2.6.23-027-create_connect_workers_for_ipv6.dif:

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

Date: Mon, 06 Aug 2007 11:57:48 -0400

SUNRPC: create connect workers for IPv6

Clone separate connect worker functions for connecting AF_INET6 sockets.

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.23-028-add_ipv6_address_support_to_net_sunrpc_xprtsock_c.dif:

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

Date: Mon, 06 Aug 2007 11:57:53 -0400

SUNRPC: Add IPv6 address support to net/sunrpc/xprtsock.c

Finalize support for setting up RPC client transports to remote RPC services addressed via IPv6.

Based on work done by Gilles Quillard at Bull Open Source.

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.23-029-add_a_helper_for_extracting_the_address_using_the_correct_type.dif:

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

Date: Mon, 06 Aug 2007 11:57:58 -0400

SUNRPC: Add a helper for extracting the address using the correct type

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

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

linux-2.6.23-030-split_xs_reclassify_socket_into_an_ipv4_and_ipv6_version.dif:

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

Date: Mon, 06 Aug 2007 11:58:04 -0400

SUNRPC: Split xs_reclassify_socket into an IPv4 and IPv6 version

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

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

linux-2.6.23-031-add_nfs_file_open_context.dif:

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

Date: Fri, 10 Aug 2007 17:44:28 -0400

NFS: Add a helper to extract the nfs_open_context from a struct file

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

linux-2.6.23-032-replace_open_coded_accesses_to_file_private_data.dif:

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

Date: Fri, 10 Aug 2007 17:44:32 -0400

NFS: Replace file->private_data with calls to nfs_file_open_context()

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

linux-2.6.23-NFS_ALL.dif:

All of the above

[ICO]NameLast modifiedSizeDescription

[PARENTDIR]Parent Directory   -  
[TXT]linux-2.6.23-001-add..>2007-07-27 14:24 2.3K 
[TXT]linux-2.6.23-002-cle..>2007-07-27 14:24 6.0K 
[TXT]linux-2.6.23-003-cle..>2007-07-27 14:24 2.9K 
[TXT]linux-2.6.23-004-rem..>2007-07-27 14:24 777  
[TXT]linux-2.6.23-005-add..>2007-07-27 14:24 3.5K 
[TXT]linux-2.6.23-006-opt..>2007-07-27 14:24 1.8K 
[TXT]linux-2.6.23-007-osy..>2007-07-27 14:24 5.7K 
[TXT]linux-2.6.23-008-fs_..>2007-08-07 20:13 967  
[TXT]linux-2.6.23-009-con..>2007-08-14 20:18 2.1K 
[TXT]linux-2.6.23-010-nfs..>2007-08-14 20:18 4.5K 
[TXT]linux-2.6.23-011-nfs..>2007-08-28 22:30 4.8K 
[TXT]linux-2.6.23-012-nfs..>2007-08-28 22:30 675  
[TXT]linux-2.6.23-013-sho..>2007-08-28 22:30 1.2K 
[TXT]linux-2.6.23-014-fix..>2007-08-28 22:30 876  
[TXT]linux-2.6.23-015-fix..>2007-08-28 22:30 848  
[TXT]linux-2.6.23-016-use..>2007-08-28 22:30 1.2K 
[TXT]linux-2.6.23-017-fre..>2007-08-28 22:30 1.6K 
[TXT]linux-2.6.23-018-add..>2007-08-28 22:30 1.7K 
[TXT]linux-2.6.23-019-ren..>2007-08-28 22:30 1.6K 
[TXT]linux-2.6.23-020-add..>2007-08-28 22:30 2.1K 
[TXT]linux-2.6.23-021-add..>2007-08-14 20:18 3.6K 
[TXT]linux-2.6.23-022-int..>2007-08-28 22:30 1.3K 
[TXT]linux-2.6.23-023-ren..>2007-08-28 22:30 1.7K 
[TXT]linux-2.6.23-024-cre..>2007-08-28 22:30 1.8K 
[TXT]linux-2.6.23-025-ref..>2007-08-28 22:30 5.5K 
[TXT]linux-2.6.23-026-ren..>2007-08-28 22:30 2.5K 
[TXT]linux-2.6.23-027-cre..>2007-08-28 22:30 3.7K 
[TXT]linux-2.6.23-028-add..>2007-08-28 22:30 4.3K 
[TXT]linux-2.6.23-029-add..>2007-08-28 22:30 2.5K 
[TXT]linux-2.6.23-030-spl..>2007-08-28 22:30 3.0K 
[TXT]linux-2.6.23-031-add..>2007-08-14 20:18 876  
[TXT]linux-2.6.23-032-rep..>2007-08-14 20:18 9.2K 
[TXT]linux-2.6.23-NFS_ALL..>2007-08-13 21:19 56K 
[   ]series 2007-08-11 17:54 1.9K 

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