]> git.karo-electronics.de Git - karo-tx-linux.git/commit
nfsd4: turn off zero-copy-read in exotic cases
authorJ. Bruce Fields <bfields@redhat.com>
Tue, 4 Feb 2014 15:36:59 +0000 (10:36 -0500)
committerJ. Bruce Fields <bfields@redhat.com>
Wed, 28 May 2014 18:53:00 +0000 (14:53 -0400)
commite63ded0c34b47ccd4b72d3e6f31debcd97bab731
treeed343f41166bf1cd99fd8b85fca3c4e25c9ce8b7
parentf5ef9ad6c6826cbc586ac828373ff39d925abbf2
nfsd4: turn off zero-copy-read in exotic cases

We currently allow only one read per compound, with operations before
and after whose responses will require no more than about a page to
encode.

While we don't expect clients to violate those limits any time soon,
this limitation isn't really condoned by the spec, so to future proof
the server we should lift the limitation.

At the same time we'd like to continue to support zero-copy reads.

Supporting multiple zero-copy-reads per compound would require a new
data structure to replace struct xdr_buf, which can represent only one
set of included pages.

So for now we plan to modify encode_read() to support either zero-copy
or non-zero-copy reads, and use some heuristics at the start of the
compound processing to decide whether a zero-copy read will work.

This will allow us to support more exotic compounds without introducing
a performance regression in the normal case.

Later patches handle those "exotic compounds", this one just makes sure
zero-copy is turned off in those cases.

Signed-off-by: J. Bruce Fields <bfields@redhat.com>
fs/nfsd/nfs4xdr.c