aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJ. Bruce Fields2012-11-15 13:52:19 -0600
committerJ. Bruce Fields2012-11-26 08:08:15 -0600
commitffe1137ba743cdf1c2414d5a89690aec1daa6bba (patch)
treeb774cb101e03779db6dd569a28b3e5d7d4bf06b1 /Documentation
parent70cc7f75b1ee4161dfdea1012223db25712ab1a5 (diff)
downloadkernel-omap-ffe1137ba743cdf1c2414d5a89690aec1daa6bba.tar.gz
kernel-omap-ffe1137ba743cdf1c2414d5a89690aec1daa6bba.tar.xz
kernel-omap-ffe1137ba743cdf1c2414d5a89690aec1daa6bba.zip
nfsd4: delay filling in write iovec array till after xdr decoding
Our server rejects compounds containing more than one write operation. It's unclear whether this is really permitted by the spec; with 4.0, it's possibly OK, with 4.1 (which has clearer limits on compound parameters), it's probably not OK. No client that we're aware of has ever done this, but in theory it could be useful. The source of the limitation: we need an array of iovecs to pass to the write operation. In the worst case that array of iovecs could have hundreds of elements (the maximum rwsize divided by the page size), so it's too big to put on the stack, or in each compound op. So we instead keep a single such array in the compound argument. We fill in that array at the time we decode the xdr operation. But we decode every op in the compound before executing any of them. So once we've used that array we can't decode another write. If we instead delay filling in that array till the time we actually perform the write, we can reuse it. Another option might be to switch to decoding compound ops one at a time. I considered doing that, but it has a number of other side effects, and I'd rather fix just this one problem for now. Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/filesystems/nfs/nfs41-server.txt4
1 files changed, 2 insertions, 2 deletions
diff --git a/Documentation/filesystems/nfs/nfs41-server.txt b/Documentation/filesystems/nfs/nfs41-server.txt
index 392ef637e101..01c2db769791 100644
--- a/Documentation/filesystems/nfs/nfs41-server.txt
+++ b/Documentation/filesystems/nfs/nfs41-server.txt
@@ -190,7 +190,7 @@ Nonstandard compound limitations:
190 ca_maxrequestsize request and a ca_maxresponsesize reply, so we may 190 ca_maxrequestsize request and a ca_maxresponsesize reply, so we may
191 fail to live up to the promise we made in CREATE_SESSION fore channel 191 fail to live up to the promise we made in CREATE_SESSION fore channel
192 negotiation. 192 negotiation.
193* No more than one IO operation (read, write, readdir) allowed per 193* No more than one read-like operation allowed per compound; encoding
194 compound. 194 replies that cross page boundaries (except for read data) not handled.
195 195
196See also http://wiki.linux-nfs.org/wiki/index.php/Server_4.0_and_4.1_issues. 196See also http://wiki.linux-nfs.org/wiki/index.php/Server_4.0_and_4.1_issues.