NFS client patches for Linux 2.6.15-rc5

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

linux-2.6.15-01-writeback_control-flag.dif:

Author: Andrew Morton <akpm@osdl.org> Date: Wed, 16 Nov 2005 15:07:01 -0800 identify multipage ->writepages() calls

NFS needs to be able to distinguish between single-page ->writepage() calls and multipage ->writepages() calls.

For the single-page writepage calls NFS can kick off the I/O within the context of ->writepage().

For multipage ->writepages calls, nfs_writepage() will leave the I/O pending and nfs_writepages() will kick off the I/O when it all has been queued up within NFS.

Cc: Trond Myklebust <trond.myklebust@fys.uio.no>

Signed-off-by: Andrew Morton <akpm@osdl.org>

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

linux-2.6.15-02-nfs_writeback_control.dif:

NFS: Work correctly with single-page ->writepage() calls

Ensure that we always initiate flushing of data before we exit a single-page ->writepage() call.

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

linux-2.6.15-03-rpc_task_cleanup_exit.dif:

SUNRPC: Yet more RPC cleanups

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

linux-2.6.15-04-rpc_task_cleanup.dif:

RPC: Clean up RPC task structure

Shrink the RPC task structure. Instead of storing separate pointers for task->tk_exit and task->tk_release, put them in a structure.

Also pass the user data pointer as a parameter instead of passing it via task->tk_calldata. This enables us to nest callbacks.

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

linux-2.6.15-05-rpc_task_cleanup_prepare.dif:

SUNRPC: Further cleanups

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

linux-2.6.15-06-rpc_async_call.dif:

NFSv4: stateful NFSv4 RPC call interface

The NFSv4 model requires us to complete all RPC calls that might establish state on the server whether or not the user wants to interrupt it. We may also need to schedule new work (including new RPC calls) in order to cancel the new state.

The asynchronous RPC model will allow us to ensure that RPC calls always complete, but in order to allow for "synchronous" RPC, we want to add the ability to wait for completion. The waits are, of course, interruptible.

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

linux-2.6.15-07-cleanup_locku.dif:

NFSv4: Make locku use the new RPC "wait on completion" interface.

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

linux-2.6.15-08-nfs_open_interruptible.dif:

NFSv4: Allocate OPEN call RPC arguments using kmalloc()

Cleanup in preparation for making OPEN calls interruptible by the user.

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

linux-2.6.15-09-cleanup_exports.dif:

SUNRPC: Get rid of some unused exports

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

linux-2.6.15-10-rpc_execute.dif:

SUNRPC: rpc_execute should not return task->tk_status;

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

linux-2.6.15-11-nfs4_async_open.dif:

NFSv4: Convert open() into an asynchronous RPC call

OPEN is a stateful operation, so we must ensure that it always completes. In order to allow users to interrupt the operation, we need to make the RPC call asynchronous, and then wait on completion (or cancel).

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

linux-2.6.15-12-nfs4_async_open_confirm.dif:

NFSv4: Make open_confirm() asynchronous too

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

linux-2.6.15-13-track_open_close.dif:

NFSv4: Make nfs4_state track O_RDWR, O_RDONLY and O_WRONLY separately

A closer reading of RFC3530 reveals that OPEN_DOWNGRADE must always specify a access modes that have been the argument of a previous OPEN operation. IOW: doing OPEN(O_RDWR) and then OPEN_DOWNGRADE(O_WRONLY) is forbidden unless the user called OPEN(O_WRONLY)

In order to fix that, we really need to track the three possible open states separately.

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

linux-2.6.15-14-fix_open_recovery.dif:

NFSv4: Make open recovery track O_RDWR, O_RDONLY and O_WRONLY correctly

When recovering from a delegation recall or a network partition, we need to replay open(O_RDWR), open(O_RDONLY) and open(O_WRONLY) separately.

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

linux-2.6.15-15-cleanup_locku_xdr.dif:

NFSv4: locking XDR cleanup

Get rid of some unnecessary intermediate structures

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

linux-2.6.15-16-nfs4_lock_interruptible.dif:

NFSv4: Convert LOCK rpc call into an asynchronous RPC call

In order to allow users to interrupt/cancel it.

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

linux-2.6.15-17-delegreturn_interruptible.dif:

NFSv4: Make DELEGRETURN an interruptible operation.

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

linux-2.6.15-18-rpc_make_killable.dif:

SUNRPC: Ensure that SIGKILL will always terminate a synchronous RPC call.

...and make sure that the "intr" flag also enables SIGHUP and SIGTERM to interrupt RPC calls too (as per the Solaris implementation).

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

linux-2.6.15-19-renew_lease.dif:

NFSv4: OPEN/LOCK/LOCKU/CLOSE will automatically renew the NFSv4 lease

Cut down on the number of unnecessary RENEW requests on the wire.

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

linux-2.6.15-20-state_recover_cleanup.dif:

NFSv4: State recovery cleanup

Use wait_on_bit() when waiting for state recovery to complete.

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

linux-2.6.15-21-use_kthread.dif:

NFS: Convert instances of kernel_thread() to kthread()

Convert private implementations in NFSv4 state recovery and delegation code to use kthreads.

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

linux-2.6.15-22-renew_only_when_stateful.dif:

NFSv4: Send RENEW requests to the server only when we're holding state

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

linux-2.6.15-23-renew_no_machine_cred.dif:

NFSv4: Remove requirement for machine creds for the "renew" operation

In RFC3530, the RENEW operation is allowed to use either

the same principal, RPC security flavour and (if RPCSEC_GSS), the same mechanism and service that was used for SETCLIENTID_CONFIRM

OR

Any principal, RPC security flavour and service combination that currently has an OPEN file on the server.

Choose the latter since that doesn't require us to keep credentials for the same principal for the entire duration of the mount.

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

linux-2.6.15-24-setclient_no_machine_cred.dif:

NFSv4: Remove requirement for machine creds for the "setclientid" operation

Use a cred from the nfs4_client->cl_state_owners list.

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

linux-2.6.15-25-fix_sock_allocation.dif:

RPC: Do not block on skb allocation

If we get something like the following, [ 125.300636] [<c04086e1>] schedule_timeout+0x54/0xa5 [ 125.305931] [<c040866e>] io_schedule_timeout+0x29/0x33 [ 125.311495] [<c02880c4>] blk_congestion_wait+0x70/0x85 [ 125.317058] [<c014136b>] throttle_vm_writeout+0x69/0x7d [ 125.322720] [<c014714d>] shrink_zone+0xe0/0xfa [ 125.327560] [<c01471d4>] shrink_caches+0x6d/0x6f [ 125.332581] [<c01472a6>] try_to_free_pages+0xd0/0x1b5 [ 125.338056] [<c013fa4b>] __alloc_pages+0x135/0x2e8 [ 125.343258] [<c03b74ad>] tcp_sendmsg+0xaa0/0xb78 [ 125.348281] [<c03d4666>] inet_sendmsg+0x48/0x53 [ 125.353212] [<c0388716>] sock_sendmsg+0xb8/0xd3 [ 125.358147] [<c0388773>] kernel_sendmsg+0x42/0x4f [ 125.363259] [<c038bc00>] sock_no_sendpage+0x5e/0x77 [ 125.368556] [<c03ee7af>] xs_tcp_send_request+0x2af/0x375 then the socket is blocked until memory is reclaimed, and no progress can ever be made.

Try to access the emergency pools by using GFP_ATOMIC.

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

linux-2.6.15-26-unmap_before_odirect.dif:

NFS: Fix another O_DIRECT race

Ensure we call unmap_mapping_range() and sync dirty pages to disk before doing an NFS direct write.

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

linux-2.6.15-27-fix_odirect_sanity_checks.dif:

Author: Chuck Lever <cel@netapp.com> Date: Wed, 30 Nov 2005 18:08:17 -0500 NFS: use generic_write_checks() to sanity check direct writes

Replace ad hoc write parameter sanity checking in nfs_file_direct_write() with a call to generic_write_checks(). This should make the proper checks modulo the O_LARGEFILE flag, and should catch NFSv2-specific limitations by virtue of i_sb->s_maxbytes.

Test plan: Posix compliance testing with both NFSv2 and NFSv3.

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

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

linux-2.6.15-28-fix_init_nfs.dif:

Author: Chuck Lever <cel@netapp.com> Date: Wed, 30 Nov 2005 18:08:19 -0500 NFS: Fix error recovery code in fs/nfs/inode.c:__init_nfs()

Red Hat found a problem in the error recovery logic in __init_nfs.

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

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

linux-2.6.15-29-simplify_nfs_page_bitops.dif:

Author: Chuck Lever <cel@netapp.com> Date: Wed, 30 Nov 2005 18:08:59 -0500 NFS: simplify inlined bit ops in nfs_page.h

Minor cleanup: inlined bit ops in nfs_page.h can be simpler.

Test plan: Write-intensive workload against a server that requires COMMITs.

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

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

linux-2.6.15-30-statfs_error_to_dprintk.dif:

Author: Chuck Lever <cel@netapp.com> Date: Wed, 30 Nov 2005 18:08:57 -0500 NFS: get rid of useless kernel log message

nfs_statfs() generates a log message when GETATTR returns an error. This is usually a useless message. Make it a dprintk.

Test plan: None

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

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

linux-2.6.15-31-improve_update_inode_error.dif:

Author: Chuck Lever <cel@netapp.com> Date: Wed, 30 Nov 2005 18:08:55 -0500 NFS: make "inode number mismatch" message more useful

To help NFS users and server developers, make the "inode number mismatch" message display more useful information.

Test-plan: None.

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

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

linux-2.6.15-32-large_wsize_support.dif:

Author: Chuck Lever <cel@netapp.com> Date: Wed, 30 Nov 2005 18:09:02 -0500 NFS: support large reads and writes on the wire

Most NFS server implementations allow up to 64KB reads and writes on the wire. The Solaris NFS server allows up to a megabyte, for instance.

Now the Linux NFS client supports transfer sizes up to 1MB, too. This will help reduce protocol and context switch overhead on read/write intensive NFS workloads, and support larger atomic read and write operations on servers that support them.

Test-plan: Connectathon and iozone on mount point with wsize=rsize>32768 over TCP. Tests with NFS over UDP to verify the maximum RPC payload size cap.

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

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

linux-2.6.15-33-return_delegation_on_rename.dif:

NFSv4: Ensure that we return the delegation on the target of a rename too.

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

linux-2.6.15-34-write_updates_mtime.dif:

NFS: Make stat() return updated mtimes after a write()

The SuS states that a call to write() will cause mtime to be updated on the file. In order to satisfy that requirement, we need to flush out any cached writes in nfs_getattr(). Speed things up slightly by not committing the writes.

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

linux-2.6.15-35-make_directio_compound_aware.dif:

NFS: Make directIO aware of compound pages...

...and avoid calling set_page_dirty on them

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

linux-2.6.15-36-fix_rpc_pipefs_race.dif:

SUNRPC: Fix a potential race in rpc_pipefs.

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

linux-2.6.15-37-change_attr_write_deleg.dif:

Author: Trond Myklebust <Trond.Myklebust@netapp.com> NFSv4: Ensure change attribute returned by GETATTR callback conforms to spec

According to RFC3530 we're supposed to cache the change attribute at the time the client receives a write delegation. If the inode is clean, a CB_GETATTR callback by the server to the client is supposed to return the cached change attribute. If, OTOH, the inode is dirty, the client should bump the cached change attribute by 1.

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

linux-2.6.15-38-delegreturn_fattr.dif:

Author: Trond Myklebust <Trond.Myklebust@netapp.com> NFSv4: Ensure DELEGRETURN returns attributes

Upon return of a write delegation, the server will almost always bump the change attribute. Ensure that we pick up that change so that we don't invalidate our data cache unnecessarily.

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

linux-2.6.15-39-wcc_cleanup.dif:

Author: Trond Myklebust <Trond.Myklebust@netapp.com> NFS: Clean up weak cache consistency code

...and ensure that nfs_update_inode() respects wcc

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

linux-2.6.15-40-callback_set_port.dif:

Author: Trond Myklebust <Trond.Myklebust@netapp.com> NFSv4: Allow user to set the port used by the NFSv4 callback channel

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

linux-2.6.15-41-kill_xdr_decode_string.dif:

Author: Adrian Bunk <bunk@stusta.de> SUNRPC: net/sunrpc/xdr.c: remove xdr_decode_string()

This patch removes ths unused function xdr_decode_string().

Signed-off-by: Adrian Bunk <bunk@stusta.de>

Acked-by: Neil Brown <neilb@suse.de>

Acked-by: Charles Lever <Charles.Lever@netapp.com>

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

linux-2.6.15-42-fix_borken_mode_bits.dif:

Author: Trond Myklebust <Trond.Myklebust@netapp.com> NFS: Send valid mode bits to the server

inode->i_mode contains a lot more than just the mode bits. Make sure that we mask away this extra stuff in SETATTR calls to the server.

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

linux-2.6.15-43-cleanup_nfs2_encode_sattr.dif:

Author: Trond Myklebust <Trond.Myklebust@netapp.com> NFS: get rid of some needless code obfuscation in xdr_encode_sattr().

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

linux-2.6.15-44-fix_server_close.dif:

Author: Trond Myklebust <Trond.Myklebust@netapp.com> SUNRPC: Ensure client closes the socket when server initiates a close

If the server decides to close the RPC socket, we currently don't actually respond until either another RPC call is scheduled, or until xprt_autoclose() gets called by the socket expiry timer (which may be up to 5 minutes later).

This patch ensures that xprt_autoclose() is called much sooner if the server closes the socket.

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

linux-2.6.15-45-flush_on_xprt_shutdown.dif:

Author: Trond Myklebust <Trond.Myklebust@netapp.com> SUNRPC: Clean up xprt_destroy()

We ought never to be calling xprt_destroy() if there are still active rpc_tasks. Optimise away the broken code that attempts to "fix" that case.

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

linux-2.6.15-46-ensure_idmap_expires.dif:

Author: Trond Myklebust <Trond.Myklebust@netapp.com> NFSv4: Allow entries in the idmap cache to expire

If someone changes the uid/gid mapping in userland, then we do eventually want those changes to be propagated to the kernel. Currently the kernel assumes that it may cache entries forever.

Add an expiration time + garbage collector for idmap entries.

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

linux-2.6.15-47-fix_borken_sector_t.dif:

VFS: Convert abuses of sector_t

The type "sector_t" is heavily tied in to the block layer interface as an offset/handle to a block, and is subject to a supposedly block-specific configuration option: CONFIG_LBD. Despite this, it is used in struct kstatfs to save a couple of bytes on the stack whenever we call the filesystems' ->statfs().

One consequence is that networked filesystems may break if CONFIG_LBD is not set, since it is quite common to have multi-TB remote filesystems.

The following patch just converts struct kstatfs to use the standard type u64.

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

linux-2.6.15-48-rpc_timeout_upcall.dif:

SUNRPC: Fix "EPIPE" error on mount of rpcsec_gss-protected partitions

gss_create_upcall() should not error just because rpc.gssd closed the pipe on its end. Instead, it should requeue the pending requests and then retry.

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

linux-2.6.15-49-fix_nlm_recovery_oops.dif:

NLM: Fix Oops in nlmclnt_mark_reclaim()

When mixing -olock and -onolock mounts on the same client, we have to check that fl->fl_u.nfs_fl.owner is set before dereferencing it.

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

linux-2.6.15-50-fix_oops_in_expire_delegations.dif:

Author: Trond Myklebust <Trond.Myklebust@netapp.com> NFSv4: Fix an Oops in nfs_do_expire_all_delegations

If the loop errors, we need to exit.

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

linux-2.6.15-NFS_ALL.dif:

All of the above

[ICO]NameLast modifiedSizeDescription

[PARENTDIR]Parent Directory   -  
[TXT]linux-2.6.15-01-writ..>2005-12-13 00:22 2.2K 
[TXT]linux-2.6.15-02-nfs_..>2005-11-30 17:23 1.4K 
[TXT]linux-2.6.15-03-rpc_..>2005-11-16 05:21 6.4K 
[TXT]linux-2.6.15-04-rpc_..>2005-12-03 19:49 42K 
[TXT]linux-2.6.15-05-rpc_..>2005-12-02 03:45 6.3K 
[TXT]linux-2.6.15-06-rpc_..>2005-11-24 20:01 8.3K 
[TXT]linux-2.6.15-07-clea..>2005-12-02 03:45 4.1K 
[TXT]linux-2.6.15-08-nfs_..>2005-12-02 03:45 10K 
[TXT]linux-2.6.15-09-clea..>2005-11-15 19:58 1.2K 
[TXT]linux-2.6.15-10-rpc_..>2005-11-17 02:49 1.4K 
[TXT]linux-2.6.15-11-nfs4..>2005-12-02 03:45 13K 
[TXT]linux-2.6.15-12-nfs4..>2005-12-02 03:45 6.4K 
[TXT]linux-2.6.15-13-trac..>2005-12-02 03:45 4.5K 
[TXT]linux-2.6.15-14-fix_..>2005-12-02 03:45 13K 
[TXT]linux-2.6.15-15-clea..>2005-12-02 03:45 20K 
[TXT]linux-2.6.15-16-nfs4..>2005-12-02 03:45 9.2K 
[TXT]linux-2.6.15-17-dele..>2005-12-02 03:45 2.6K 
[TXT]linux-2.6.15-18-rpc_..>2005-12-03 03:07 1.6K 
[TXT]linux-2.6.15-19-rene..>2005-12-02 03:45 6.6K 
[TXT]linux-2.6.15-20-stat..>2005-12-02 03:45 4.7K 
[TXT]linux-2.6.15-21-use_..>2005-12-02 21:24 3.5K 
[TXT]linux-2.6.15-22-rene..>2005-12-02 21:24 5.9K 
[TXT]linux-2.6.15-23-rene..>2005-12-02 21:24 7.0K 
[TXT]linux-2.6.15-24-setc..>2005-12-02 21:24 8.1K 
[TXT]linux-2.6.15-25-fix_..>2005-12-05 22:36 1.8K 
[TXT]linux-2.6.15-26-unma..>2005-12-07 19:22 4.4K 
[TXT]linux-2.6.15-27-fix_..>2005-12-08 18:17 3.0K 
[TXT]linux-2.6.15-28-fix_..>2005-12-08 18:17 790  
[TXT]linux-2.6.15-29-simp..>2005-12-08 18:17 1.4K 
[TXT]linux-2.6.15-30-stat..>2005-12-08 18:17 931  
[TXT]linux-2.6.15-31-impr..>2005-12-08 18:17 1.5K 
[TXT]linux-2.6.15-32-larg..>2005-12-08 18:17 13K 
[TXT]linux-2.6.15-33-retu..>2005-12-08 21:05 595  
[TXT]linux-2.6.15-34-writ..>2005-12-09 14:52 2.4K 
[TXT]linux-2.6.15-35-make..>2005-12-09 22:22 711  
[TXT]linux-2.6.15-36-fix_..>2005-12-12 23:48 1.4K 
[TXT]linux-2.6.15-37-chan..>2005-12-14 04:33 2.0K 
[TXT]linux-2.6.15-38-dele..>2005-12-14 04:42 5.7K 
[TXT]linux-2.6.15-39-wcc_..>2005-12-15 04:40 3.7K 
[TXT]linux-2.6.15-40-call..>2005-12-15 04:58 6.5K 
[TXT]linux-2.6.15-41-kill..>2005-12-15 05:18 1.8K 
[TXT]linux-2.6.15-42-fix_..>2005-12-15 21:24 1.6K 
[TXT]linux-2.6.15-43-clea..>2005-12-15 21:24 1.8K 
[TXT]linux-2.6.15-44-fix_..>2005-12-16 08:08 4.2K 
[TXT]linux-2.6.15-45-flus..>2005-12-16 07:13 2.6K 
[TXT]linux-2.6.15-46-ensu..>2005-12-16 01:15 4.3K 
[TXT]linux-2.6.15-47-fix_..>2005-12-15 04:42 1.2K 
[TXT]linux-2.6.15-48-rpc_..>2005-12-18 21:56 1.9K 
[TXT]linux-2.6.15-49-fix_..>2005-12-18 22:22 1.1K 
[TXT]linux-2.6.15-50-fix_..>2005-12-20 01:09 925  
[TXT]linux-2.6.15-NFS_ALL..>2005-12-20 02:20 191K 

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