aboutsummaryrefslogtreecommitdiff
path: root/sys/fs/nfs/nfs_var.h
diff options
context:
space:
mode:
authorRick Macklem <rmacklem@FreeBSD.org>2022-04-30 20:49:23 +0000
committerRick Macklem <rmacklem@FreeBSD.org>2022-04-30 20:49:23 +0000
commit5218d82c81f987223054671b9821d39f08d87599 (patch)
tree1bc31e50e82dc6201c9de6f188febe8cc99281ef /sys/fs/nfs/nfs_var.h
parent13cf4313043655ce2562bf2fb9b8af554db184d2 (diff)
downloadsrc-5218d82c81f987223054671b9821d39f08d87599.tar.gz
src-5218d82c81f987223054671b9821d39f08d87599.zip
nfscl: Add support for a NFSv4 AppendWrite RPC
For IO_APPEND VOP_WRITE()s, the code first does a Getattr RPC to acquire the file's size, before it can do the Write RPC. Although NFS does not have an append write operation, an NFSv4 compound can use a Verify operation to check that the client's notion of the file's size is correct, followed by the Write operation. This patch modifies the NFSv4 client to use an Appendwrite RPC, which does a Verify to check the file's size before doing the Write. This avoids the need for a Getattr RPC to preceed this RPC and reduces the RPC count by half for IO_APPEND writes, so long as the client knows the file's size. The nfsd structure was moved from the stack to be malloc()'d, since the kernel stack limit was being exceeded. While here, fix the types of a few variables, although there should not be any semantics change caused by these type changes.
Diffstat (limited to 'sys/fs/nfs/nfs_var.h')
-rw-r--r--sys/fs/nfs/nfs_var.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/fs/nfs/nfs_var.h b/sys/fs/nfs/nfs_var.h
index 3a2a27890d7b..c4dc2451523e 100644
--- a/sys/fs/nfs/nfs_var.h
+++ b/sys/fs/nfs/nfs_var.h
@@ -471,7 +471,7 @@ int nfsrpc_readlink(vnode_t, struct uio *, struct ucred *,
int nfsrpc_read(vnode_t, struct uio *, struct ucred *, NFSPROC_T *,
struct nfsvattr *, int *, void *);
int nfsrpc_write(vnode_t, struct uio *, int *, int *,
- struct ucred *, NFSPROC_T *, struct nfsvattr *, int *, void *, int);
+ struct ucred *, NFSPROC_T *, struct nfsvattr *, int *, int, int);
int nfsrpc_mknod(vnode_t, char *, int, struct vattr *, u_int32_t,
enum vtype, struct ucred *, NFSPROC_T *, struct nfsvattr *,
struct nfsvattr *, struct nfsfh **, int *, int *, void *);