NFS client patches for Linux 2.6.9 and 2.6.10-rc1

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

linux-2.6.9-01-rpc_workqueue.dif:

RPC: Convert rpciod into a work queue for greater flexibility.

Signed-off-by: Trond Myklebust <trond.myklebust@fys.uio.no>

linux-2.6.9-02-rpc_queue_lock.dif:

RPC: Remove the rpc_queue_lock global spinlock. Replace it with per-rpc_queue spinlocks

Signed-off-by: Trond Myklebust <trond.myklebust@fys.uio.no>

linux-2.6.9-03-lookup_readdirplus.dif:

NFS: Make readdirplus create dentries on the fly when we're running through the directory.

Signed-off-by: Trond Myklebust <trond.myklebust@fys.uio.no>

linux-2.6.9-04-remove_cached_lookup.dif:

NFS: The fact that readdirplus calls now create dentries from within readdir calls renders nfs_cached_lookup() obsolete.

Signed-off-by: Trond Myklebust <trond.myklebust@fys.uio.no>

linux-2.6.9-05-cleanup_create.dif:

NFS: Change rpc_ops->create() to take a dentry argument rather than a qstr.

Signed-off-by: Trond Myklebust <trond.myklebust@fys.uio.no>

linux-2.6.9-06-open_dentry.dif:

NFSv4: Make nfs4_do_open() take a dentry argument.

Signed-off-by: Trond Myklebust <trond.myklebust@fys.uio.no>

linux-2.6.9-07-nfs4_fixcreds.dif:

NFSv4: setattr, close and open_downgrade should use the state_owner's credentials when they are available.

Signed-off-by: Trond Myklebust <trond.myklebust@fys.uio.no>

linux-2.6.9-08-async_close.dif:

NFSv4: Convert the NFSv4 close and open_downgrade operations to use asynchronous RPC calls.

Signed-off-by: Trond Myklebust <trond.myklebust@fys.uio.no>

linux-2.6.9-09-gss_ctx_expiration.dif:

RPCSEC_GSS: When the gss code notices that a cred has expired, mark the cred containing the context non-uptodate, triggering creation of a new context.

Note that on the send-side operations (get_mic, wrap), we mark the cred as not uptodate, but continue trying to use it; the server can complain if it wants to, and the next time through we'll refresh it.

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

Signed-off-by: Trond Myklebust <trond.myklebust@fys.uio.no>

linux-2.6.9-10-gss_downcall_error_fix.dif:

RPC: Instead of setting a flag (RPCAUTH_CRED_DEAD) in the cred to indicate failure of an upcall to get a gss context for that cred, set the status of waiting tasks to indicate failure.

This solves problems e.g. with creds with the CRED_DEAD flag set never being refreshed, which caused krb5 mounts to fail after the context used to do RENEWS expired.

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

Signed-off-by: Trond Myklebust <trond.myklebust@fys.uio.no>

linux-2.6.9-11-rpcauth_remove_obsolete_flag.dif:

RPC: The RPCAUTH_CRED_DEAD flag had been unused for some time before I unwisely revived it for use with the gss code. Having removed that use from the gss code, it's time to remove all references to it.

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

Signed-off-by: Trond Myklebust <trond.myklebust@fys.uio.no>

linux-2.6.9-12-gss_client_cleanup.dif:

RPCSEC_GSS: Miscellaneous cleanup of auth_gss.c: we're passing something as a void * when we know perfectly well what it is. And we're passing some arguments that we don't actually use.

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

Signed-off-by: Trond Myklebust <trond.myklebust@fys.uio.no>

linux-2.6.9-13-nfs-sync-write-alloc.dif:

NFS: Sync NFS writes still use kmalloc

Replace the kmalloc() and kfree() calls in this path with appropriate invocations of nfs_writedata_alloc() and nfs_writedata_free(). This makes nfs_writepage_sync match all the other write paths in fs/nfs/write.c.

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

Signed-off-by: Trond Myklebust <trond.myklebust@fys.uio.no>

linux-2.6.9-14-nfs_stale_tweak.dif:

NFSv2/v3/v4: ESTALE should not be a permanent condition on directories.

Although it usually means that someone has deleted a file on the server, the ESTALE error may also indicate that the sysadmin has used exportfs to deny our client access to the server. Most NFS implementations therefore consider it a non-permanent condition, and allow inodes to "recover" when the sysadmin re-enables access. If, however, you want to work with broken servers, like unfsd, that reuse filehandles for new files after the original file gets deleted, then "recovery" is impossible, since it may be that the filehandle now points to a different file. Note that this is broken server behaviour that may happen even without us ever seeing the ESTALE error. In order to minimize (but we can never eliminate entirely) this race condition on unfsd servers, Linux has traditionally made ESTALE a permanent condition on all filehandles except the root filehandle.

The problem is that if we apply this strict staleness criterion to directories (particularly so for he current directory), then all processes will need to re-walk the path starting from the mount point, in order to recover from the sysadmin intervention case. As this is not usual on other *NIX implementations, and may in any case be undermined by caching rules etc, this is being seen as a usability problem.

This patch makes ESTALE a non-permanent condition on directories, but preserves the current behaviour for non-directories.

Signed-off-by: Trond Myklebust <trond.myklebust@fys.uio.no>

linux-2.6.9-15-fix_dentry_aliasing.dif:

VFS: Avoid dentry aliasing problems in filesystems like NFS, where inodes may be marked as stale in one instance (causing the dentry to be dropped) then re-enabled in the next instance.

Signed-off-by: Trond Myklebust <trond.myklebust@fys.uio.no>

linux-2.6.9-16-optimize_rpc_timer.dif:

RPC: Optimize away unnecessary del_timer_sync() operations, when we know there are no pending timers.

Signed-off-by: Trond Myklebust <trond.myklebust@fys.uio.no>

linux-2.6.9-17-fix_nfs_nolock.dif:

NFS: when we mount with the "nolock" flag we need to use local locking.

Signed-off-by: Trond Myklebust <trond.myklebust@fys.uio.no>

linux-2.6.9-18-remove_LOCK_USE_CLNT.dif:

VFS: Remove LOCK_USE_CLNT. It should no longer be necessary.

NFS: when we mount with the "nolock" flag we need to use local locking.

Signed-off-by: Trond Myklebust <trond.myklebust@fys.uio.no>

linux-2.6.9-19-fix_rename.dif:

NFS: Fix dentry refcount accounting error which causes unnecessary sillyrenames when renaming to an existing file.

Signed-off-by: Greg Banks <gnb@melbourne.sgi.com>

Signed-off-by: Trond Myklebust <trond.myklebust@fys.uio.no>

linux-2.6.9-20-nfs-short-write-msg.dif:

NFS: short write warning

Recently a patch set was accepted to allow the Linux NFS client to handle short writes by retrying the unwritten portion of the request. The only case that now results in an error is when the server makes no progress; that is, writes zero bytes.

This patch changes the kernel log warning that is generated in that case to reflect the error condition more accurately.

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

Signed-off-by: Trond Myklebust <trond.myklebust@fys.uio.no>

linux-2.6.9-21-nfs-getattr-msgs.dif:

NFS: report return code on GETATTR and SETATTR

Improve trace debugging messages for NFSv2/3 GETATTR and SETATTR procedures.

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

Signed-off-by: Trond Myklebust <trond.myklebust@fys.uio.no>

linux-2.6.9-22-rpc-ntohl.dif:

RPC: display XIDs in host order

Ethereal and other tools display RPC XIDs in host order. This patch changes the RPC trace messages that display XIDs to print them in host order so they can be easily matched to XIDs that appear in Ethereal.

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

Signed-off-by: Trond Myklebust <trond.myklebust@fys.uio.no>

linux-2.6.9-23-nfs-direct-write-verf.dif:

NFS: Use sizeof() instead of C macro

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

Signed-off-by: Trond Myklebust <trond.myklebust@fys.uio.no>

linux-2.6.9-24-nfs-short-direct-write.dif:

NFS: better handling of short writes in direct write path

Immediately return control to the application if a short NFS write is detected in the NFS client's direct write path. This is better behavior than what the direct write path does today, which could result in data appearing at the wrong offset in the file.

Eventually this code path should retry short writes at least once before giving up.

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

Signed-off-by: Trond Myklebust <trond.myklebust@fys.uio.no>

linux-2.6.9-25-nfs-direct-write-alloc.dif:

NFS: Direct write path allocates nfs_write_data on the stack

Reduce stack utilization in the NFS direct write path by using a dynamically allocated nfs_write_data structure instead of allocating one on the stack. This reduces stack utilization of nfs_direct_write_seg from over 900 bytes to less than 100 bytes.

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

Signed-off-by: Trond Myklebust <trond.myklebust@fys.uio.no>

linux-2.6.9-26-nfs-direct-read-alloc.dif:

NFS: Direct read path allocates nfs_read_data on the stack

Reduce stack utilization in the NFS direct read path by using a dynamically allocated nfs_read_data structure instead of allocating one on the stack. This reduces stack utilization of nfs_direct_read_seg from over 900 bytes to less than 100 bytes.

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

Signed-off-by: Trond Myklebust <trond.myklebust@fys.uio.no>

linux-2.6.9-27-nfs-direct-parallel-read.dif:

NFS: Use parallel read operations to do direct read requests

The initial implementation of NFS direct reads was entirely synchronous. The direct read logic issued one NFS READ operation at a time, and waited for the server's reply before issuing the next one. For large direct read requests, this is unnecessarily slow.

This patch changes the NFS direct read path to dispatch NFS READ operations for a single direct read request in parallel and wait for them once. The direct read path is still synchronous in nature, but because the NFS READ operations are going in parallel, the completion wait should be much shorter.

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

Signed-off-by: Trond Myklebust <trond.myklebust@fys.uio.no>

linux-2.6.9-28-nfs-direct-wb-all.dif:

NFS: Direct reads and writes need to flush dirty cache pages

Other parts of the NFS client invoke nfs_wb_all() when they want to flush dirty cache pages. The direct path needs to do that, too.

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

Signed-off-by: Trond Myklebust <trond.myklebust@fys.uio.no>

linux-2.6.9-29-nfs-noac.dif:

NFS: use attribute timeout instead of "noac" mount option

The behavior enabled by the "noac" mount option should be precisely equivalent to setting acreg{min,max} or acdir{min,max} to zero via mount options.

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

Signed-off-by: Trond Myklebust <trond.myklebust@fys.uio.no>

linux-2.6.9-30-access_cache.dif:

NFS: Ensure ACCESS caches are invalidated together with the attribute cache.

Signed-off-by: Trond Myklebust <trond.myklebust@fys.uio.no>

linux-2.6.9-31-nfs-blocksize2.dif:

NFS: incorrect "df" results

Fix an NFS client bug introduced in 2.6.9-rc1. The "df" command was reporting the size of NFS file systems incorrectly.

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

Signed-off-by: Trond Myklebust <trond.myklebust@fys.uio.no>

linux-2.6.9-NFS_ALL.dif:

All of the above patches rolled into one.


Last modified: Mon Jan 05 14:33:10 EST 2004
[ICO]NameLast modifiedSizeDescription

[PARENTDIR]Parent Directory   -  
[TXT]linux-2.6.9-01-rpc_w..>2004-12-29 06:40 29K 
[TXT]linux-2.6.9-02-rpc_q..>2004-12-29 06:40 8.1K 
[TXT]linux-2.6.9-03-looku..>2004-12-29 06:40 3.4K 
[TXT]linux-2.6.9-04-remov..>2004-12-29 06:40 4.7K 
[TXT]linux-2.6.9-05-clean..>2004-12-29 06:41 5.1K 
[TXT]linux-2.6.9-06-open_..>2004-12-29 06:41 3.0K 
[TXT]linux-2.6.9-07-nfs4_..>2004-12-29 06:41 1.1K 
[TXT]linux-2.6.9-08-async..>2004-12-29 06:41 8.7K 
[TXT]linux-2.6.9-09-gss_c..>2004-12-29 06:41 3.7K 
[TXT]linux-2.6.9-10-gss_d..>2004-12-29 06:41 1.9K 
[TXT]linux-2.6.9-11-rpcau..>2004-12-29 06:41 2.5K 
[TXT]linux-2.6.9-12-gss_c..>2004-12-29 06:41 2.5K 
[TXT]linux-2.6.9-13-nfs-s..>2004-12-29 06:42 1.3K 
[TXT]linux-2.6.9-14-nfs_s..>2004-12-29 06:42 3.2K 
[TXT]linux-2.6.9-15-fix_d..>2004-10-25 15:54 7.0K 
[TXT]linux-2.6.9-16-optim..>2004-12-29 06:42 2.0K 
[TXT]linux-2.6.9-17-fix_n..>2004-12-29 06:42 4.8K 
[TXT]linux-2.6.9-18-remov..>2004-12-29 06:42 1.8K 
[TXT]linux-2.6.9-19-fix_r..>2004-12-29 06:42 1.3K 
[TXT]linux-2.6.9-20-nfs-s..>2004-12-29 06:42 1.2K 
[TXT]linux-2.6.9-21-nfs-g..>2004-12-29 06:42 3.5K 
[TXT]linux-2.6.9-22-rpc-n..>2004-12-29 06:43 1.6K 
[TXT]linux-2.6.9-23-nfs-d..>2004-12-29 06:43 1.4K 
[TXT]linux-2.6.9-24-nfs-s..>2004-12-29 06:43 1.2K 
[TXT]linux-2.6.9-25-nfs-d..>2004-12-29 06:43 8.2K 
[TXT]linux-2.6.9-26-nfs-d..>2004-12-29 06:43 6.0K 
[TXT]linux-2.6.9-27-nfs-d..>2004-12-29 06:43 16K 
[TXT]linux-2.6.9-28-nfs-d..>2004-12-29 06:43 1.2K 
[TXT]linux-2.6.9-29-nfs-n..>2004-12-29 06:43 1.0K 
[TXT]linux-2.6.9-30-acces..>2004-12-29 06:43 4.6K 
[TXT]linux-2.6.9-31-nfs-b..>2004-12-29 06:43 1.6K 
[TXT]linux-2.6.9-NFS_ALL.dif2004-10-27 23:08 112K 

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