summaryrefslogtreecommitdiffstats
path: root/fs/nfsd/vfs.h
diff options
context:
space:
mode:
authorChuck Lever <chuck.lever@oracle.com>2023-05-18 13:45:56 -0400
committerChuck Lever <chuck.lever@oracle.com>2023-06-11 16:37:45 -0400
commit507df40ebf31655203dd05e6e31db5849a83347a (patch)
treed639cfde77a2ea18bdad9def841aca9b18e8a457 /fs/nfsd/vfs.h
parented4a567a179ec15c15f78fa60ca6de9cc4f34897 (diff)
downloadlinux-stable-507df40ebf31655203dd05e6e31db5849a83347a.tar.gz
linux-stable-507df40ebf31655203dd05e6e31db5849a83347a.tar.bz2
linux-stable-507df40ebf31655203dd05e6e31db5849a83347a.zip
NFSD: Hoist rq_vec preparation into nfsd_read()
Accrue the following benefits: a) Deduplicate this common bit of code. b) Don't prepare rq_vec for NFSv2 and NFSv3 spliced reads, which don't use rq_vec. This is already the case for nfsd4_encode_read(). c) Eventually, converting NFSD's read path to use a bvec iterator will be simpler. In the next patch, nfsd_iter_read() will replace nfsd_readv() for all NFS versions. Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Diffstat (limited to 'fs/nfsd/vfs.h')
-rw-r--r--fs/nfsd/vfs.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/fs/nfsd/vfs.h b/fs/nfsd/vfs.h
index 43fb57a301d3..6381a2890b0b 100644
--- a/fs/nfsd/vfs.h
+++ b/fs/nfsd/vfs.h
@@ -115,8 +115,12 @@ __be32 nfsd_readv(struct svc_rqst *rqstp, struct svc_fh *fhp,
struct kvec *vec, int vlen,
unsigned long *count,
u32 *eof);
-__be32 nfsd_read(struct svc_rqst *, struct svc_fh *,
- loff_t, struct kvec *, int, unsigned long *,
+__be32 nfsd_iter_read(struct svc_rqst *rqstp, struct svc_fh *fhp,
+ struct file *file, loff_t offset,
+ unsigned long *count, unsigned int base,
+ u32 *eof);
+__be32 nfsd_read(struct svc_rqst *rqstp, struct svc_fh *fhp,
+ loff_t offset, unsigned long *count,
u32 *eof);
__be32 nfsd_write(struct svc_rqst *, struct svc_fh *, loff_t,
struct kvec *, int, unsigned long *,