A design document describing the new RPC client transport switch API is available here.
These patches apply in order to stock 2.6.6 kernels. These patches are experimental, and may change at any time. Use at your own risk.
NFS Direct I/O requires more flexibility than the VFS O_DIRECT implementation can provide in order to support high performance and remove race conditions. This patch changes the NFS client direct I/O implemenation so that it no longer uses the VFS O_DIRECT implementation.
fs/nfs/direct.c | 166 ++++++++++++++++++++++++++++++++++++++++++++++--- fs/nfs/file.c | 10 ++ include/linux/nfs_fs.h | 4 + 3 files changed, 170 insertions(+), 10 deletions(-)
The "cp" program uses fstat(3) to determine the optimal blocksize to use when copying files. Previously, the NFS client returned the server's disk blocksize for this value (usually 512 bytes), but using the value set for the wsize mount option works much better. This patch makes that change, and adds support for reporting the server's disk blocksize in the f_frsize field returned by statfs(2).
fs/nfs/inode.c | 14 ++++++-------- include/linux/nfs_fs_sb.h | 1 + 2 files changed, 7 insertions(+), 8 deletions(-)
This patch simplifies the logic that handles mount failures.
inode.c | 126 +++++++++++++++++++++++++--------------------------------------- 1 files changed, 50 insertions(+), 76 deletions(-)
This patch introduces a transport switch into the kernel RPC client. Such a switch will allow support for RPC over 10GbE, IPsec offload, multiple sockets per mount, and transports capable of direct data placement. The first patch in the series moves socket-specific code into a separate source file, net/sunrpc/sock.c.
include/linux/sunrpc/xprt.h | 31 + net/sunrpc/Makefile | 2 net/sunrpc/clnt.c | 2 net/sunrpc/sock.c | 1074 ++++++++++++++++++++++++++++++++++++++++++++ net/sunrpc/xprt.c | 942 ++------------------------------------ 5 files changed, 1164 insertions(+), 887 deletions(-)
This patch moves all socket-dependent code in net/sunrpc/xdr.c to net/sunrpc/sock.c.
include/linux/sunrpc/xdr.h | 5 - net/sunrpc/sock.c | 117 ++++++++++++++++++++++++++++++++++++++++++++- net/sunrpc/xdr.c | 111 ------------------------------------------ 3 files changed, 116 insertions(+), 117 deletions(-)
This patch cleans up remaining socket-specific structure naming, and changing some comments to reflect the new transport switch mechanism.
include/linux/sunrpc/xprt.h | 56 ++++++++++++++----- net/sunrpc/auth.c | 1 net/sunrpc/auth_gss/auth_gss.c | 2 net/sunrpc/auth_gss/gss_mech_switch.c | 1 net/sunrpc/auth_gss/gss_pseudoflavors.c | 1 net/sunrpc/auth_gss/sunrpcgss_syms.c | 1 net/sunrpc/auth_null.c | 2 net/sunrpc/auth_unix.c | 2 net/sunrpc/sock.c | 20 +++--- net/sunrpc/sunrpc_syms.c | 1 net/sunrpc/xprt.c | 92 +++++++++++++++----------------- 11 files changed, 95 insertions(+), 84 deletions(-)
This patch splits the socket write space call back function into a TCP version and UDP version, eliminating a dependence on the "stream" variable in that path. It also makes the callbacks more CPU efficient by reducing the number of conditional branches taken in the hot path.
sock.c | 72 ++++++++++++++++++++++++++++++++++++++++++++++++++--------------- 1 files changed, 56 insertions(+), 16 deletions(-)
This patch splits the connection logic into separate paths for UDP and TCP, eliminating another set of dependencies on the "stream" variable.
sock.c | 158 +++++++++++++++++++++++++++++++++++------------------------------ 1 files changed, 86 insertions(+), 72 deletions(-)
Now we split the main RPC socket write path into a TCP version and a UDP version to eliminate more dependencies on the "stream" variable.
sock.c | 199 ++++++++++++++++++++++++++++++++++++++--------------------------- 1 files changed, 117 insertions(+), 82 deletions(-)
Add a mechanism for skipping over transport-specific headers when constructing an RPC request. This removes another "stream" dependency, and gets rid of another conditional branch in the hot path.
include/linux/sunrpc/xprt.h | 9 +++++++++ net/sunrpc/auth_gss/auth_gss.c | 4 +--- net/sunrpc/clnt.c | 4 +--- net/sunrpc/sock.c | 38 +++++++++++++++++++++++++++++++++++--- 4 files changed, 46 insertions(+), 9 deletions(-)
Now we can remove the last few places that use the "stream" variable.
fs/lockd/host.c | 3 +-- include/linux/sunrpc/xprt.h | 3 +-- net/sunrpc/sock.c | 3 +-- net/sunrpc/xprt.c | 3 +-- 4 files changed, 4 insertions(+), 8 deletions(-)
Some transports may choose to use pre-allocated buffers for encoding, sending, receiving, and unmarshalling RPC messages. This patch adds RPC transport switch support for replacing buffer management.
include/linux/sunrpc/sched.h | 6 ++---- include/linux/sunrpc/xprt.h | 15 +++++++-------- net/sunrpc/clnt.c | 14 ++++++++------ net/sunrpc/sched.c | 35 ++++++++++++++++++----------------- net/sunrpc/sock.c | 5 +++++ net/sunrpc/xprt.c | 3 +++ 6 files changed, 43 insertions(+), 35 deletions(-)
This patch cleans up some fields in the rpc_task struct.
include/linux/sunrpc/sched.h | 4 ---- include/linux/sunrpc/xprt.h | 4 ++++ net/sunrpc/clnt.c | 19 ++++++++++--------- net/sunrpc/sched.c | 5 ----- net/sunrpc/xprt.c | 3 +++ 5 files changed, 17 insertions(+), 18 deletions(-)
This patch prepares the way to remove the "nocong" variable by adding callouts to handle setting RPC timeouts.
include/linux/sunrpc/clnt.h | 1 include/linux/sunrpc/xprt.h | 4 +- net/sunrpc/sock.c | 71 ++++++++++++++++++++++++++++++++++++++++++++ net/sunrpc/xprt.c | 43 ++++++-------------------- 4 files changed, 84 insertions(+), 35 deletions(-)
Get rid of the "nocong" variable.
fs/lockd/host.c | 1 - include/linux/sunrpc/xprt.h | 1 - net/sunrpc/sock.c | 2 -- net/sunrpc/xprt.c | 8 ++++---- 4 files changed, 4 insertions(+), 8 deletions(-)
Provide an API for getting the remote peer address without allowing direct access to the rpc_xprt struct.
fs/lockd/clntproc.c | 10 ++++----- fs/lockd/host.c | 1 fs/lockd/svclock.c | 11 ++++++---- include/linux/nfs_fs.h | 1 include/linux/sunrpc/clnt.h | 2 - include/linux/sunrpc/xprt.h | 16 ++++++++++++++- net/sunrpc/clnt.c | 4 ++- net/sunrpc/pmap_clnt.c | 10 ++++----- net/sunrpc/rpc_pipe.c | 5 +++- net/sunrpc/sock.c | 46 ++++++++++++++++++++++++++++++++++++++++---- net/sunrpc/xprt.c | 4 ++- 11 files changed, 84 insertions(+), 26 deletions(-)
Last modified: Tue May 18 22:36:38 EDT 2004