aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/sunrpc/svc.h
diff options
context:
space:
mode:
authorChuck Lever <chuck.lever@oracle.com>2020-05-20 17:30:12 -0400
committerChuck Lever <chuck.lever@oracle.com>2020-05-20 17:30:12 -0400
commitca07eda33e01eafa7a26ec06974f7eacee6a89c8 (patch)
tree7a87b7f483c651f1d378a8207f83f08db682c7ac /include/linux/sunrpc/svc.h
parentSUNRPC: Clean up svc_release_skb() functions (diff)
downloadlinux-dev-ca07eda33e01eafa7a26ec06974f7eacee6a89c8.tar.xz
linux-dev-ca07eda33e01eafa7a26ec06974f7eacee6a89c8.zip
SUNRPC: Refactor svc_recvfrom()
This function is not currently "generic" so remove the documenting comment and rename it appropriately. Its internals are converted to use bio_vecs for reading from the transport socket. In existing typical sunrpc uses of bio_vecs, the bio_vec array is allocated dynamically. Here, instead, an array of bio_vecs is added to svc_rqst. The lifetime of this array can be greater than one call to xpo_recvfrom(): - Multiple calls to xpo_recvfrom() might be needed to read an RPC message completely. - At some later point, rq_arg.bvecs will point to this array and it will carry the received message into svc_process(). I also expect that a future optimization will remove either the rq_vec or rq_pages array in favor of rq_bvec, thus conserving the size of struct svc_rqst. Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Diffstat (limited to 'include/linux/sunrpc/svc.h')
-rw-r--r--include/linux/sunrpc/svc.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/sunrpc/svc.h b/include/linux/sunrpc/svc.h
index fd390894a584..05da19a0516d 100644
--- a/include/linux/sunrpc/svc.h
+++ b/include/linux/sunrpc/svc.h
@@ -254,6 +254,7 @@ struct svc_rqst {
struct page * *rq_page_end; /* one past the last page */
struct kvec rq_vec[RPCSVC_MAXPAGES]; /* generally useful.. */
+ struct bio_vec rq_bvec[RPCSVC_MAXPAGES];
__be32 rq_xid; /* transmission id */
u32 rq_prog; /* program number */