summaryrefslogtreecommitdiffstats
path: root/fs/nfs/nfs4xdr.c
diff options
context:
space:
mode:
authorAnna Schumaker <Anna.Schumaker@netapp.com>2014-05-06 09:12:24 -0400
committerTrond Myklebust <trond.myklebust@primarydata.com>2014-05-28 18:12:02 -0400
commit3c6b899c49e5e9c2803b59ee553eddaf69cea7f6 (patch)
treea246624f122f66a823365dfaaf6d3e56be1d2fa8 /fs/nfs/nfs4xdr.c
parentfab5fc25d230edcc8ee72367e505955a2fae0cac (diff)
NFS: Create a common argument structure for reads and writes
Reads and writes have very similar arguments. This patch combines them together and documents the few fields used only by write. Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com> Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Diffstat (limited to 'fs/nfs/nfs4xdr.c')
-rw-r--r--fs/nfs/nfs4xdr.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/fs/nfs/nfs4xdr.c b/fs/nfs/nfs4xdr.c
index 73ce8d4fe2c8..032159c36a57 100644
--- a/fs/nfs/nfs4xdr.c
+++ b/fs/nfs/nfs4xdr.c
@@ -1556,7 +1556,8 @@ static void encode_putrootfh(struct xdr_stream *xdr, struct compound_hdr *hdr)
1556 encode_op_hdr(xdr, OP_PUTROOTFH, decode_putrootfh_maxsz, hdr); 1556 encode_op_hdr(xdr, OP_PUTROOTFH, decode_putrootfh_maxsz, hdr);
1557} 1557}
1558 1558
1559static void encode_read(struct xdr_stream *xdr, const struct nfs_readargs *args, struct compound_hdr *hdr) 1559static void encode_read(struct xdr_stream *xdr, const struct nfs_pgio_args *args,
1560 struct compound_hdr *hdr)
1560{ 1561{
1561 __be32 *p; 1562 __be32 *p;
1562 1563
@@ -1701,7 +1702,8 @@ static void encode_setclientid_confirm(struct xdr_stream *xdr, const struct nfs4
1701 encode_nfs4_verifier(xdr, &arg->confirm); 1702 encode_nfs4_verifier(xdr, &arg->confirm);
1702} 1703}
1703 1704
1704static void encode_write(struct xdr_stream *xdr, const struct nfs_writeargs *args, struct compound_hdr *hdr) 1705static void encode_write(struct xdr_stream *xdr, const struct nfs_pgio_args *args,
1706 struct compound_hdr *hdr)
1705{ 1707{
1706 __be32 *p; 1708 __be32 *p;
1707 1709
@@ -2451,7 +2453,7 @@ static void nfs4_xdr_enc_readdir(struct rpc_rqst *req, struct xdr_stream *xdr,
2451 * Encode a READ request 2453 * Encode a READ request
2452 */ 2454 */
2453static void nfs4_xdr_enc_read(struct rpc_rqst *req, struct xdr_stream *xdr, 2455static void nfs4_xdr_enc_read(struct rpc_rqst *req, struct xdr_stream *xdr,
2454 struct nfs_readargs *args) 2456 struct nfs_pgio_args *args)
2455{ 2457{
2456 struct compound_hdr hdr = { 2458 struct compound_hdr hdr = {
2457 .minorversion = nfs4_xdr_minorversion(&args->seq_args), 2459 .minorversion = nfs4_xdr_minorversion(&args->seq_args),
@@ -2513,7 +2515,7 @@ static void nfs4_xdr_enc_getacl(struct rpc_rqst *req, struct xdr_stream *xdr,
2513 * Encode a WRITE request 2515 * Encode a WRITE request
2514 */ 2516 */
2515static void nfs4_xdr_enc_write(struct rpc_rqst *req, struct xdr_stream *xdr, 2517static void nfs4_xdr_enc_write(struct rpc_rqst *req, struct xdr_stream *xdr,
2516 struct nfs_writeargs *args) 2518 struct nfs_pgio_args *args)
2517{ 2519{
2518 struct compound_hdr hdr = { 2520 struct compound_hdr hdr = {
2519 .minorversion = nfs4_xdr_minorversion(&args->seq_args), 2521 .minorversion = nfs4_xdr_minorversion(&args->seq_args),