]> git.baikalelectronics.ru Git - kernel.git/commit
NFSD: Handle full-length symlinks
authorChuck Lever <chuck.lever@oracle.com>
Fri, 27 Jul 2018 15:19:10 +0000 (11:19 -0400)
committerJ. Bruce Fields <bfields@redhat.com>
Thu, 9 Aug 2018 20:11:21 +0000 (16:11 -0400)
commit7505333159d7cecc48901abde05effb635007a5d
treed2558f204fe319fc365c07756bfd48a055a0580d
parent81f6dc087cd34ba895aad9561f34b36f6e5b7e8e
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>
fs/nfsd/nfs3proc.c
fs/nfsd/nfsproc.c
include/linux/sunrpc/svc.h
net/sunrpc/svc.c