SUNRPC: mark bulk read/write data in xdrbuf
Adds a flag word to the xdrbuf struct which indicates any bulk disposition of the data. This enables RPC transport providers to marshal it efficiently/appropriately, and may enable other optimizations. Signed-off-by: Tom Talpey <tmt@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
This commit is contained in:
committed by
Trond Myklebust
parent
20c71f5e0f
commit
4f22ccc346
@ -346,6 +346,7 @@ nfs3_xdr_readargs(struct rpc_rqst *req, __be32 *p, struct nfs_readargs *args)
|
||||
replen = (RPC_REPHDRSIZE + auth->au_rslack + NFS3_readres_sz) << 2;
|
||||
xdr_inline_pages(&req->rq_rcv_buf, replen,
|
||||
args->pages, args->pgbase, count);
|
||||
req->rq_rcv_buf.flags |= XDRBUF_READ;
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -367,6 +368,7 @@ nfs3_xdr_writeargs(struct rpc_rqst *req, __be32 *p, struct nfs_writeargs *args)
|
||||
|
||||
/* Copy the page array */
|
||||
xdr_encode_pages(sndbuf, args->pages, args->pgbase, count);
|
||||
sndbuf->flags |= XDRBUF_WRITE;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user