NFS client patches for Linux 2.6.25-rc5

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

linux-2.6.25-001-dont_ignore_return_value_from_nfs_pageio_add_request.dif:

From: Fred Isaman <iisaman@citi.umich.edu>

Date: Wed, 19 Mar 2008 11:24:39 -0400

nfs: don't ignore return value from nfs_pageio_add_request

Ignoring the return value from nfs_pageio_add_request can cause deadlocks.

In read path: call nfs_pageio_add_request from readpage_async_filler assume at this point that there are requests already in desc, that can't be merged with the current request. so nfs_pageio_doio is fired up to clear out desc. assume something goes wrong in setting up the io, so desc->pg_error is set. This causes nfs_pageio_add_request to return 0, *WITHOUT* adding the original request. BUT, since return code is ignored, readpage_async_filler assumes it has been added, and does nothing further, leaving page locked. do_generic_mapping_read will eventually call lock_page, resulting in deadlock

In write path: page is marked dirty by generic_perform_write nfs_writepages is called call nfs_pageio_add_request from nfs_page_async_flush assume at this point that there are requests already in desc, that can't be merged with the current request. so nfs_pageio_doio is fired up to clear out desc. assume something goes wrong in setting up the io, so desc->pg_error is set. This causes nfs_page_async_flush to return 0, *WITHOUT* adding the original request, yet marking the request as locked (PG_BUSY) and in writeback, clearing dirty marks. The next time a write is done to the page, deadlock will result as nfs_write_end calls nfs_update_request

Signed-off-by: Fred Isaman <iisaman@citi.umich.edu>

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

linux-2.6.25-002-cleanup_redirty_request.dif:

From: Fred <iisaman@citi.umich.edu>

Date: Wed, 19 Mar 2008 11:24:38 -0400

nfs: nfs_redirty_request

Both flush functions have the same error handling routine. Pull it out as a function.

Signed-off-by: Fred Isaman <iisaman@citi.umich.edu>

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

linux-2.6.25-003-remove_duplicate_initialisations_of_nfs_read_data.dif:

From: Fred Isaman <iisaman@citi.umich.edu>

Date: Wed, 19 Mar 2008 11:54:04 -0400

nfs: remove duplicate initializations of nfs_read_data field

Signed-off-by: Fred Isaman <iisaman@citi.umich.edu>

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

linux-2.6.25-004-clean_up_short_packet_handling_for_nfsv2_readdir.dif:

From: Jeff Layton <jlayton@redhat.com>

Date: Fri, 22 Feb 2008 14:49:59 -0500

NFS: clean up short packet handling for NFSv2 readdir

Currently, the NFS readdir decoders have a workaround for buggy servers that send an empty readdir response with the EOF bit unset. If the server sends a malformed response in some cases, this workaround kicks in and just returns an empty response rather than returning a proper error to the caller.

This patch does 3 things:

1) have malformed responses with no entries return error (-EIO)

2) preserve existing workaround for servers that send empty responses with the EOF marker unset.

3) Add some comments to clarify the logic in nfs_xdr_readdirres().

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

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

linux-2.6.25-005-clean_up_short_packet_handling_for_nfsv3_readdir.dif:

From: Jeff Layton <jlayton@redhat.com>

Date: Fri, 22 Feb 2008 14:50:00 -0500

NFS: clean up short packet handling for NFSv3 readdir

Currently, the NFS readdir decoders have a workaround for buggy servers that send an empty readdir response with the EOF bit unset. If the server sends a malformed response in some cases, this workaround kicks in and just returns an empty response rather than returning a proper error to the caller.

This patch does 3 things:

1) have malformed responses with no entries return error (-EIO)

2) preserve existing workaround for servers that send empty responses with the EOF marker unset.

3) Add some comments to clarify the logic in nfs3_xdr_readdirres().

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

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

linux-2.6.25-006-clean_up_short_packet_handling_for_nfsv4_readdir.dif:

From: Jeff Layton <jlayton@redhat.com>

Date: Fri, 22 Feb 2008 14:50:01 -0500

NFS: clean up short packet handling for NFSv4 readdir

Currently, the NFS readdir decoders have a workaround for buggy servers that send an empty readdir response with the EOF bit unset. If the server sends a malformed response in some cases, this workaround kicks in and just returns an empty response rather than returning a proper error to the caller.

This patch does 3 things:

1) have malformed responses with no entries return error (-EIO)

2) preserve existing workaround for servers that send empty responses with the EOF marker unset.

3) Add some comments to clarify the logic in decode_readdir().

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

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

linux-2.6.25-007-numeric_mount_parameters_are_unsigned.dif:

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

Date: Fri, 14 Mar 2008 14:10:08 -0400

NFS: numeric mount parameters are unsigned

Clean up: use %u instead of %d when displaying NFS mount options.

Nit: Fix reporting of "namlen=" option in nfs_show_mount_stats. The mount option is called "namlen" without the "e".

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

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

linux-2.6.25-008-fix_up_data_types_of_fields_in_nfs_parsed_mount_options.dif:

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

Date: Fri, 14 Mar 2008 14:10:15 -0400

NFS: Fix up data types of fields in nfs_parsed_mount_options

Clean up: make data types of fields in nfs_parsed_mount_options more consistent with other uses.

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

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

linux-2.6.25-009-save_the_value_of_the_port_mount_option.dif:

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

Date: Fri, 14 Mar 2008 14:10:22 -0400

NFS: Save the value of the "port=" mount option

During a remount based on the mount options displayed in /proc/mounts, we want to preserve the original behavior of the mount request. Let's save the original setting of the "port=" mount option in the mount's nfs_server structure.

This allows us to simplify the default behavior of port setting for NFSv4 mounts: by default, NFSv2/3 mounts first try an RPC bind to determine the NFS server's port, unless the user specified the "port=" mount option; Users can force the client to skip the RPC bind by explicitly specifying "port=<value>".

NFSv4, by contrast, assumes the NFS server port is 2049 and skips the RPC bind, unless the user specifies "port=". Users can force an RPC bind for NFSv4 by explicitly specifying "port=0".

I added a couple of extra comments to clarify this behavior.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Cc: Miklos Szeredi <miklos@szeredi.hu>

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

linux-2.6.25-010-save_the_values_of_the_mount_mount_options.dif:

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

Date: Fri, 14 Mar 2008 14:10:30 -0400

NFS: Save the values of the "mount*=" mount options

Save the value of the mountproto= mountport= mountvers= and mountaddr= options so that these values can be displayed later via nfs_show_options().

This preserves the intent of the original mount options, should the file system need to be remounted based on what's displayed in /proc/mounts.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Cc: Miklos Szeredi <miklos@szeredi.hu>

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

linux-2.6.25-011-show_most_mount_options_via_nfs_show_options.dif:

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

Date: Fri, 14 Mar 2008 14:10:37 -0400

NFS: Show most mount options via nfs_show_options()

Display all mount options in /proc/mount which may be needed to reconstruct a previous mount.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Cc: Miklos Szeredi <miklos@szeredi.hu>

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

linux-2.6.25-012-always_enable_nfs_direct_i_o.dif:

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

Date: Fri, 14 Mar 2008 14:14:56 -0400

NFS: Always enable NFS direct I/O

Since O_DIRECT is a standard feature that is enabled in most distros, eliminate the CONFIG_NFS_DIRECTIO build option, and change the fs/nfs/Makefile to always build in the NFS direct I/O engine.

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

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

linux-2.6.25-013-update_help_kconfig_text.dif:

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

Date: Fri, 14 Mar 2008 14:15:11 -0400

SUNRPC: Update help Kconfig text

Clean up: refresh the help text for Kconfig items related to the sunrpc module. Remove obsolete URLs, and make the language consistent among the options.

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

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

linux-2.6.25-014-add_a_default_setting_for_config_sunrpc_bind34.dif:

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

Date: Fri, 14 Mar 2008 14:15:18 -0400

SUNRPC: Add a default setting for CONFIG_SUNRPC_BIND34

Most distros will want support for rpcbind protocols 3 and 4 to default off until they have integrated user-space support for the new rpcbind daemon which supports IPv6 RPC services.

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

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

linux-2.6.25-015-lockd_fails_to_load_if_config_sysctl_is_not_set.dif:

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

Date: Fri, 14 Mar 2008 14:18:30 -0400

NLM: LOCKD fails to load if CONFIG_SYSCTL is not set

Bruce Fields says: "By the way, we've got another config-related nit here:

http://bugzilla.linux-nfs.org/show_bug.cgi?id=156

You can build lockd without CONFIG_SYSCTL set, but then the module will fail to load."

For now, disable the sysctl registration calls in lockd if CONFIG_SYSCTL is not enabled. This allows the kernel to build properly if PROC_FS or SYSCTL is not enabled, but an NFS client is desired.

In the long run, we would like to be able to build the kernel with an NFS client but without lockd. This makes sense, for example, if you want an NFSv4-only NFS client, as NFSv4 doesn't use NLM at all.

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

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

linux-2.6.25-016-nlm_protocol_version_numbers_are_u32.dif:

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

Date: Fri, 14 Mar 2008 14:18:37 -0400

NLM: NLM protocol version numbers are u32

Clean up: RPC protocol version numbers are u32. Make sure we use an appropriate type for NLM version numbers when calling nlm_lookup_host().

Eliminates a harmless mixed sign comparison in nlm_host_lookup().

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

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

linux-2.6.25-017-bring_a_few_function_declarations_up_to_date.dif:

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

Date: Fri, 14 Mar 2008 14:18:45 -0400

lockd: bring a few function declarations up to date

Clean-up: replace __inline__ and use up-to-date function declaration conventions.

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

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

linux-2.6.25-018-ensure_nsm_strings_aren_t_longer_than_protocol_allows.dif:

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

Date: Fri, 14 Mar 2008 14:25:32 -0400

lockd: Ensure NSM strings aren't longer than protocol allows

Introduce a special helper function to check the length of NSM strings before they are placed on the wire.

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

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

linux-2.6.25-019-refactor_sm_mon_mon_name_argument_encoder.dif:

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

Date: Fri, 14 Mar 2008 14:25:39 -0400

lockd: refactor SM_MON mon_name argument encoder

Clean up: introduce a new XDR encoder specifically for the mon_name argument of SM_MON requests. This will be updated later to support IPv6 addresses in addition to IPv4 addresses.

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

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

linux-2.6.25-020-refactor_sm_mon_my_id_argument_encoder.dif:

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

Date: Fri, 14 Mar 2008 14:25:46 -0400

lockd: refactor SM_MON my_id argument encoder

Clean up: introduce a new XDR encoder specifically for the my_id argument of SM_MON requests.

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

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

linux-2.6.25-021-document_use_of_mon_id_argument_in_sm_mon_requests.dif:

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

Date: Fri, 14 Mar 2008 14:25:53 -0400

lockd: document use of mon_id argument in SM_MON requests

Clean up: document the argument type that xdr_encode_common() is marshalling by introducing a new function. The new function will replace xdr_encode_common() in just a sec.

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

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

linux-2.6.25-022-fix_up_incorrect_rpc_buffer_size_calculations.dif:

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

Date: Fri, 14 Mar 2008 14:26:01 -0400

lockd: Fix up incorrect RPC buffer size calculations.

Switch to using the new mon_id encoder function.

Now that we've refactored the encoding of SM_MON requests, we've discovered that the pre-computed buffer length maximums are incorrect!

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

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

linux-2.6.25-023-introduce_new_function_to_encode_private_argument_in_sm_mon_requests.dif:

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

Date: Fri, 14 Mar 2008 14:26:08 -0400

lockd: introduce new function to encode private argument in SM_MON requests

Clean up: refactor the encoding of the opaque 16-byte private argument in xdr_encode_mon(). This will be updated later to support IPv6 addresses.

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

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

[ICO]NameLast modifiedSizeDescription

[PARENTDIR]Parent Directory   -  
[TXT]linux-2.6.25-001-don..>2008-03-19 20:51 3.1K 
[TXT]linux-2.6.25-002-cle..>2008-03-19 20:51 2.6K 
[TXT]linux-2.6.25-003-rem..>2008-03-19 20:51 971  
[TXT]linux-2.6.25-004-cle..>2008-03-19 20:51 2.9K 
[TXT]linux-2.6.25-005-cle..>2008-03-19 20:51 2.9K 
[TXT]linux-2.6.25-006-cle..>2008-03-19 20:51 3.0K 
[TXT]linux-2.6.25-007-num..>2008-03-19 20:51 2.8K 
[TXT]linux-2.6.25-008-fix..>2008-03-19 20:51 1.0K 
[TXT]linux-2.6.25-009-sav..>2008-03-19 20:51 5.5K 
[TXT]linux-2.6.25-010-sav..>2008-03-19 20:51 2.0K 
[TXT]linux-2.6.25-011-sho..>2008-03-19 20:51 3.9K 
[TXT]linux-2.6.25-012-alw..>2008-03-19 20:51 4.3K 
[TXT]linux-2.6.25-013-upd..>2008-03-19 20:51 3.3K 
[TXT]linux-2.6.25-014-add..>2008-03-19 20:51 922  
[TXT]linux-2.6.25-015-loc..>2008-03-19 20:51 2.1K 
[TXT]linux-2.6.25-016-nlm..>2008-03-19 20:51 2.8K 
[TXT]linux-2.6.25-017-bri..>2008-03-19 20:51 1.8K 
[TXT]linux-2.6.25-018-ens..>2008-03-19 20:51 935  
[TXT]linux-2.6.25-019-ref..>2008-03-19 20:51 1.7K 
[TXT]linux-2.6.25-020-ref..>2008-03-19 20:51 1.2K 
[TXT]linux-2.6.25-021-doc..>2008-03-19 20:51 1.1K 
[TXT]linux-2.6.25-022-fix..>2008-03-19 20:51 2.7K 
[TXT]linux-2.6.25-023-int..>2008-03-19 20:51 2.4K 
[   ]series 2008-03-19 20:51 1.6K 

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