summaryrefslogtreecommitdiffstats
path: root/fs/nfsd/nfs4proc.c
diff options
context:
space:
mode:
authorJ. Bruce Fields <bfields@redhat.com>2013-08-26 16:04:46 -0400
committerJ. Bruce Fields <bfields@redhat.com>2014-05-30 17:31:54 -0400
commit2825a7f90753012babe7ee292f4a1eadd3706f92 (patch)
treefd536a28343ffc50432d0f8e7627929e06c023bf /fs/nfsd/nfs4proc.c
parenta8095f7e80fbf3e0efe4ee5cd3f509113c56290f (diff)
downloadlinux-2825a7f90753012babe7ee292f4a1eadd3706f92.tar.bz2
nfsd4: allow encoding across page boundaries
After this we can handle for example getattr of very large ACLs. Read, readdir, readlink are still special cases with their own limits. Also we can't handle a new operation starting close to the end of a page. Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'fs/nfsd/nfs4proc.c')
-rw-r--r--fs/nfsd/nfs4proc.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/nfsd/nfs4proc.c b/fs/nfsd/nfs4proc.c
index 3ce431b9b577..5d8f9158701d 100644
--- a/fs/nfsd/nfs4proc.c
+++ b/fs/nfsd/nfs4proc.c
@@ -1264,6 +1264,10 @@ static void svcxdr_init_encode(struct svc_rqst *rqstp,
xdr->end = head->iov_base + PAGE_SIZE - 2 * RPC_MAX_AUTH_SIZE;
/* Tail and page_len should be zero at this point: */
buf->len = buf->head[0].iov_len;
+ xdr->scratch.iov_len = 0;
+ xdr->page_ptr = buf->pages;
+ buf->buflen = PAGE_SIZE * (1 + rqstp->rq_page_end - buf->pages)
+ - 2 * RPC_MAX_AUTH_SIZE;
}
/*