diff options
author | Chuck Lever <chuck.lever@oracle.com> | 2018-07-27 11:19:10 -0400 |
---|---|---|
committer | J. Bruce Fields <bfields@redhat.com> | 2018-08-09 16:11:21 -0400 |
commit | 11b4d66ea3313d9b03a83b80458ddee64990e3c3 (patch) | |
tree | d2558f204fe319fc365c07756bfd48a055a0580d /include | |
parent | 3fd9557aec919e2db99365ad5a2c00d04ae8893c (diff) | |
download | linux-stable-11b4d66ea3313d9b03a83b80458ddee64990e3c3.tar.gz linux-stable-11b4d66ea3313d9b03a83b80458ddee64990e3c3.tar.bz2 linux-stable-11b4d66ea3313d9b03a83b80458ddee64990e3c3.zip |
NFSD: Handle full-length symlinks
I've given up on the idea of zero-copy handling of SYMLINK on the
server side. This is because the Linux VFS symlink API requires the
symlink pathname to be in a NUL-terminated kmalloc'd buffer. The
NUL-termination is going to be problematic (watching out for
landing on a page boundary and dealing with a 4096-byte pathname).
I don't believe that SYMLINK creation is on a performance path or is
requested frequently enough that it will cause noticeable CPU cache
pollution due to data copies.
There will be two places where a transport callout will be necessary
to fill in the rqstp: one will be in the svc_fill_symlink_pathname()
helper that is used by NFSv2 and NFSv3, and the other will be in
nfsd4_decode_create().
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/sunrpc/svc.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/linux/sunrpc/svc.h b/include/linux/sunrpc/svc.h index 43f88bd7b601..73e130a840ce 100644 --- a/include/linux/sunrpc/svc.h +++ b/include/linux/sunrpc/svc.h @@ -499,7 +499,8 @@ unsigned int svc_fill_write_vector(struct svc_rqst *rqstp, struct page **pages, struct kvec *first, size_t total); char *svc_fill_symlink_pathname(struct svc_rqst *rqstp, - struct kvec *first, size_t total); + struct kvec *first, void *p, + size_t total); #define RPC_MAX_ADDRBUFLEN (63U) |