These patches apply after Trond's NFSALL patch for 2.4.21-pre7.
This patch sets the default NFS over TCP connection timeout to 60 seconds no matter how the "timeo=" mount option is set. It also shortens the time it takes the RPC client to detect a server outage when mounting with TCP.
include/linux/sunrpc/xprt.h | 7 +++++++ net/sunrpc/clnt.c | 2 +- net/sunrpc/xprt.c | 4 +++- 3 files changed, 11 insertions(+), 2 deletions(-)
From a change to 2.5.21. Catch a few more cases where we need to renew inode->d_time: when we deliberately create a negative dentry, or rename a file.
dir.c | 3 +++ 1 files changed, 3 insertions(+)
This patch resolves the following issues:
if the passed-in inode is NULL, nfs_lock should return EBADF, not EINVAL. most lock operations grab the inode's semaphor before f_ops->lock is invoked, so this is not likely to trigger in recent kernels.
if the passed-in inode is NULL and NFS trace messages are enabled, the dprintk will cause an oops when it attempts to dereference the inode pointer.
normally BSD flocks are not allowed on files contained in NFS. if "nolock" is enabled, BSD flocks are allowed on NFS files. note that this may be desired behavior, but if it is, it should be documented in the code (and in the "nfs(5)" man page).
FL_BROKEN is not set anywhere in the kernel, so it has been removed.
currently when nfs_lock is invoked for a GETLK, it flushes pending writes to the file under test. this isn't necessary and hampers application performance.
the current nfs_lock logic is convoluted, which led to some of the issues resolved in this patch. break out and separate the paths for GETLK and SETLK/SETLKW to make clear what each is doing, and how the behavior of each changes when "nolock" is in effect.
file.c | 123 +++++++++++++++++++++++++++++++++++++++-------------------------- 1 files changed, 75 insertions(+), 48 deletions(-)
By using the "nolock" option, a system administrator can disable the use of NLM locking procedures. This is typically used when mounting a server that is known not to support the NLM protocol.
Solaris has a mount option called "llock" that disables NLM similar to Linux's "nolock." On Solaris, locking a file means cache purging and write flushing, just like on Linux, but in addition, locking a file also causes reads and writes to be completely uncached. "llock" disables both the extra cache purging and write flushing, and the uncached I/O, resulting in I/O performance similar to an unlocked file.
This patch changes the behavior of the Linux "nolock" mount option to match the semantics of Solaris "llock". The extra cache behavior is unneeded if the client doesn't also send NLM procedures to notify the server (and hence other clients) that a file has been locked or unlocked. This gives system administrators a new way to improve performance in cases where an application running on a single client doesn't need the extra shared locking semantics and can benefit from the performance boost of not flushing the cache on every lock or unlock request.
file.c | 24 ++++++++++++------------ 1 files changed, 12 insertions(+), 12 deletions(-)
This patch increases the maximum supported "rsize" and "wsize" to 128KB for the Linux NFS client. This is only for NFS Version 3 and higher over TCP. The client will not set an "rsize" or "wsize" larger than a server supports, so this is in preparation for large I/O support on servers.
nfs_xdr.h | 19 +++++++++++++------ sunrpc/xdr.h | 5 +++-- 2 files changed, 16 insertions(+), 8 deletions(-)
Last modified: Wed Apr 23 22:16:01 EDT 2003