NFS client patches for Linux 2.6.25-rc8

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

linux-2.6.25-001-fix_copy_to_pages.dif:

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

Date: Mon, 31 Mar 2008 17:02:02 -0400

SUNRPC: don't call flush_dcache_page() with an invalid pointer

Fix a problem in _copy_to_pages(), whereby it may call flush_dcache_page() with an invalid pointer due to the fact that 'pgto' gets incremented beyond the end of the page array. Fix is to exit the loop without this unnecessary increment of pgto.

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

linux-2.6.25-002-initialise_nfs_open_context_flags.dif:

From: Jeff Layton <jlayton@redhat.com>

Date: Mon, 31 Mar 2008 15:01:58 -0400

NFS: initialize flags field in nfs_open_context

The nfs_open_context struct had a "flags" field added recently, but the allocator isn't initializing it. It also looks like the allocator isn't initializing the mode or list either, but they seem to be overwritten by the caller, so that's less of an issue.

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

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

linux-2.6.25-003-fix_mmap_nommu.dif:

From: Bryan Wu <cooloney@kernel.org>

Date: Tue, 1 Apr 2008 20:23:39 -0700

[NFS/NOMMU]: fix bug - executing FDPIC ELF on NFS mount triggers BUG() at mm/nommu.c:862:/do_mmap_private()

NFS needs a NOMMU version mmap function to support uClinux on NOMMU machine http://blackfin.uclinux.org/gf/project/uclinux-dist/tracker/?action=TrackerItemEdit&tra cker_id=141&tracker_item_id=3992

Signed-off-by: Bryan Wu <cooloney@kernel.org> Cc: Mike Frysinger <vapier.adi@gmail.com>

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

linux-2.6.25-004-fix_xprt_memory_leak.dif:

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

Date: Mon, 07 Apr 2008 16:52:44 -0400

SUNRPC: Fix a memory leak in rpc_create()

Commit 510deb0d was supposed to move the xprt_create_transport() call in rpc_create(), but neglected to remove the old call site. This resulted in a transport leak after every rpc_create() call.

This leak is present in 2.6.24 and 2.6.25.

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

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

linux-2.6.25-005-remove_bogus_nfs4_drop_state_owner.dif:

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

Date: Sat, 5 Apr 2008 15:54:17 -0400

NFSv4: Remove bogus call to nfs4_drop_state_owner() in _nfs4_open_expired()

There should be no need to invalidate a perfectly good state owner just because of a stale filehandle. Doing so can cause the state recovery code to break, since nfs4_get_renew_cred() and nfs4_get_setclientid_cred() rely on finding active state owners.

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

linux-2.6.25-006-fix_up_seqid_increment.dif:

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

Date: Mon, 7 Apr 2008 13:20:54 -0400

NFSv4: Only increment the sequence id if the server saw it

It is quite possible that the OPEN, CLOSE, LOCK, LOCKU,... compounds fail before the actual stateful operation has been executed (for instance in the PUTFH call). There is no way to tell from the overall status result which operations were executed from the COMPOUND.

The fix is to move incrementing of the sequence id into the XDR layer, so that we do it as we process the results from the stateful operation.

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

linux-2.6.25-007-fix_warn_on.dif:

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

Date: Fri, 21 Mar 2008 16:19:41 -0400

SUNRPC: Fix read ordering problems with req->rq_private_buf.len

We want to ensure that req->rq_private_buf.len is updated before req->rq_received, so that call_decode() doesn't use an old value for req->rq_rcv_buf.len.

In 'call_decode()' itself, instead of using task->tk_status (which is set using req->rq_received) must use the actual value of req->rq_private_buf.len when deciding whether or not the received RPC reply is too short.

Finally ensure that we set req->rq_rcv_buf.len to zero when retrying a request. A typo meant that we were resetting req->rq_private_buf.len in call_decode(), and then clobbering that value with the old rq_rcv_buf.len again in xprt_transmit().

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

linux-2.6.25-008-fix_fl_flags_nlm.dif:

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

Date: Tue, 1 Apr 2008 18:57:06 -0400

NLM/lockd: Ensure we don't corrupt fl->fl_flags in nlmclnt_unlock()

Also fix up nlmclnt_lock() so that it doesn't pass modified versions of fl->fl_flags to nlmclnt_cancel() and other helpers.

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

linux-2.6.25-009-fix_fl_flags_nfs4.dif:

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

Date: Fri, 4 Apr 2008 15:08:02 -0400

NFSv4: Ensure we don't corrupt fl->fl_flags in nfs4_proc_unlck

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

linux-2.6.25-010-reference_count_nlm_rqst.dif:

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

Date: Tue, 1 Apr 2008 18:58:49 -0400

NLM/lockd: Add a reference counter to struct nlm_rqst

When we replace the existing synchronous RPC calls with asynchronous calls, the reference count will be needed in order to allow us to examine the result of the RPC call.

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

linux-2.6.25-011-convert_nlm_async_call.dif:

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

Date: Fri, 28 Mar 2008 16:04:36 -0400

NLM/lockd: convert __nlm_async_call to use rpc_run_task()

Peter Staubach comments:

> In the course of investigating testing failures in the locking phase of > the Connectathon testsuite, I discovered a couple of things. One was > that one of the tests in the locking tests was racy when it didn't seem > to need to be and two, that the NFS client asynchronously releases locks > when a process is exiting. ... > The Single UNIX Specification Version 3 specifies that: "All locks > associated with a file for a given process shall be removed when a file > descriptor for that file is closed by that process or the process holding > that file descriptor terminates.". > > This does not specify whether those locks must be released prior to the > completion of the exit processing for the process or not. However, > general assumptions seem to be that those locks will be released. This > leads to more deterministic behavior under normal circumstances.

The following patch converts the NFSv2/v3 locking code to use the same mechanism as NFSv4 for sending asynchronous RPC calls and then waiting for them to complete. This ensures that the UNLOCK and CANCEL RPC calls will complete even if the user interrupts the call, yet satisfies the above request for synchronous behaviour on process exit.

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

linux-2.6.25-012-remove_unnecessary_signal_masking.dif:

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

Date: Fri, 28 Mar 2008 16:04:51 -0400

NLM: Remove the signal masking in nlmclnt_proc/nlmclnt_cancel

The signal masks have been rendered obsolete by the preceding patch.

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

linux-2.6.25-013-make_nlmclnt_cancel_return_status_info.dif:

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

Date: Wed, 2 Apr 2008 14:40:53 -0400

NLM/lockd: Ensure that nlmclnt_cancel() returns results of the CANCEL call

Currently, it returns success as long as the RPC call was sent. We'd like to know if the CANCEL operation succeeded on the server.

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

linux-2.6.25-014-fix_nlmclnt_cancel_race.dif:

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

Date: Tue, 1 Apr 2008 20:26:22 -0400

NLM/lockd: Fix a race when cancelling a blocking lock

We shouldn't remove the lock from the list of blocked locks until the CANCEL call has completed since we may be racing with a GRANTED callback.

Also ensure that we send an UNLOCK if the CANCEL request failed. Normally that should only happen if the process gets hit with a fatal signal.

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

linux-2.6.25-015-remove_buggy_lock_on_signal.dif:

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

Date: Tue, 1 Apr 2008 20:26:52 -0400

NFS: Remove the buggy lock-if-signalled case from do_setlk()

Both NLM and NFSv4 should be able to clean up adequately in the case where the user interrupts the RPC call...

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

linux-2.6.25-016-nlm_client_use_correct_credentials.dif:

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

Date: Wed, 2 Apr 2008 14:44:05 -0400

NLM/lockd: Ensure client locking calls use correct credentials

Now that we've added the 'generic' credentials (that are independent of the rpc_client) to the nfs_open_context, we can use those in the NLM client to ensure that the lock/unlock requests are authenticated to whoever originally opened the file.

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

linux-2.6.25-017-cleanup_nfs_stat_to_errno.dif:

From: Benny Halevy <bhalevy@panasas.com>

Date: Mon, 31 Mar 2008 17:39:06 +0300

nfs: return negative error value from nfs{,4}_stat_to_errno

All use sites for nfs{,4}_stat_to_errno negate their return value. It's more efficient to return a negative error from the stat_to_errno convertors rather than negating its return value everywhere. This also produces slightly smaller code.

Signed-off-by: Benny Halevy <bhalevy@panasas.com>

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

linux-2.6.25-018-zero_pad_hex_bitfields.dif:

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

Date: Wed, 2 Apr 2008 15:21:15 +0300

nfs: fix printout of multiword bitfields

Benny points out that zero-padding of multiword bitfields is necessary, and that delimiting each word is nice to avoid endianess confusion.

bhalevy: without zero padding output can be ambiguous. Also, since the printed array of two 32-bit unsigned integers is not a 64-bit number, delimiting the output with a semicolon makes more sense.

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

Signed-off-by: Benny Halevy <bhalevy@panasas.com>

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

linux-2.6.25-019-fixup_setclientid_cred_cr_name.dif:

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

Date: Mon, 7 Apr 2008 20:49:28 -0400

NFSv4: Don't use cred->cr_ops->cr_name in nfs4_proc_setclientid()

With the recent change to generic creds, we can no longer use cred->cr_ops->cr_name to distinguish between RPCSEC_GSS principals and AUTH_SYS/AUTH_NULL identities. Replace it with the rpc_authops->au_name instead...

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

linux-2.6.25-020-reintroduce_machine_creds.dif:

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

Date: Mon, 7 Apr 2008 20:50:11 -0400

NFSv4: Reintroduce machine creds

We need to try to ensure that we always use the same credentials whenever we re-establish the clientid on the server. If not, the server won't recognise that we're the same client, and so may not allow us to recover state.

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

linux-2.6.25-021-use_machine_creds.dif:

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

Date: Tue, 8 Apr 2008 16:02:17 -0400

NFSv4: Attempt to use machine credentials in SETCLIENTID calls

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

linux-2.6.25-022-gss_triple_to_pseudoflavor.dif:

From: Andy Adamson <andros@umich.edu>

Date: Fri, 18 May 2007 16:52:39 -0400

SUNRPC: Add a helper function to convert a GSS triple into pseudoflavor

Helper function for OP_SECINFO. Return the pseudoflavor for a supported security mechanism OID, qop, and service. Return RPC_AUTH_MAXFLAVOR upon failure.

Signed-off-by: Andy Adamson <andros@citi.umich.edu>

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

linux-2.6.25-023-nfs_secinfo_xdr.dif:

From: Andy Adamson <andros@umich.edu>

Date: Fri, 18 May 2007 16:52:40 -0400

NFSv4: Add the NFS SECINFO xdr encode/decode routines

Encode and decode routines for OP_SECINFO. Decode routine saves an orderd list of up to NFS4_SECINFO_MAXFLAVORS server supplied pseudoflavors supported on the client.

Signed-off-by: Andy Adamson <andros@citi.umich.edu>

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

linux-2.6.25-024-nfs_secinfo_proc.dif:

From: Andy Adamson <andros@umich.edu>

Date: Fri, 18 May 2007 16:52:44 -0400

NFSv4: Add the NFS SECINFO proc

Place the secinfo call on the wire

Signed-off-by: Andy Adamson <andros@citi.umich.edu>

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

[ICO]NameLast modifiedSizeDescription

[PARENTDIR]Parent Directory   -  
[TXT]linux-2.6.25-001-fix..>2008-04-08 20:53 1.4K 
[TXT]linux-2.6.25-002-ini..>2008-04-08 20:53 1.0K 
[TXT]linux-2.6.25-003-fix..>2008-04-08 20:53 1.0K 
[TXT]linux-2.6.25-004-fix..>2008-04-08 20:53 1.0K 
[TXT]linux-2.6.25-005-rem..>2008-04-08 20:53 1.1K 
[TXT]linux-2.6.25-006-fix..>2008-04-08 20:53 7.8K 
[TXT]linux-2.6.25-007-fix..>2008-04-08 20:53 3.0K 
[TXT]linux-2.6.25-008-fix..>2008-04-08 20:53 2.1K 
[TXT]linux-2.6.25-009-fix..>2008-04-08 20:53 1.0K 
[TXT]linux-2.6.25-010-ref..>2008-04-08 20:53 1.6K 
[TXT]linux-2.6.25-011-con..>2008-04-08 20:53 5.2K 
[TXT]linux-2.6.25-012-rem..>2008-04-08 20:53 3.1K 
[TXT]linux-2.6.25-013-mak..>2008-04-08 20:53 1.5K 
[TXT]linux-2.6.25-014-fix..>2008-04-08 20:53 3.2K 
[TXT]linux-2.6.25-015-rem..>2008-04-08 20:53 1.2K 
[TXT]linux-2.6.25-016-nlm..>2008-04-08 20:53 4.0K 
[TXT]linux-2.6.25-017-cle..>2008-04-08 20:53 14K 
[TXT]linux-2.6.25-018-zer..>2008-04-08 20:53 2.0K 
[TXT]linux-2.6.25-019-fix..>2008-04-08 20:53 3.4K 
[TXT]linux-2.6.25-020-rei..>2008-04-08 20:53 5.0K 
[TXT]linux-2.6.25-021-use..>2008-04-08 20:53 2.7K 
[TXT]linux-2.6.25-022-gss..>2008-04-08 20:53 2.3K 
[TXT]linux-2.6.25-023-nfs..>2008-04-08 20:53 6.3K 
[TXT]linux-2.6.25-024-nfs..>2008-04-08 20:53 1.5K 
[   ]series 2008-04-08 20:53 1.1K 

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