nfs4xdr.c (72de53ec4bca39c26709122a8f78bfefe7b6bca4) nfs4xdr.c (0b7c01533aa9f4a228d07d2768d084acb3a387bc)
1/*
2 * fs/nfs/nfs4xdr.c
3 *
4 * Client-side XDR for NFSv4.
5 *
6 * Copyright (c) 2002 The Regents of the University of Michigan.
7 * All rights reserved.
8 *

--- 1089 unchanged lines hidden (view full) ---

1098
1099static void encode_close(struct xdr_stream *xdr, const struct nfs_closeargs *arg, struct compound_hdr *hdr)
1100{
1101 encode_op_hdr(xdr, OP_CLOSE, decode_close_maxsz, hdr);
1102 encode_nfs4_seqid(xdr, arg->seqid);
1103 encode_nfs4_stateid(xdr, arg->stateid);
1104}
1105
1/*
2 * fs/nfs/nfs4xdr.c
3 *
4 * Client-side XDR for NFSv4.
5 *
6 * Copyright (c) 2002 The Regents of the University of Michigan.
7 * All rights reserved.
8 *

--- 1089 unchanged lines hidden (view full) ---

1098
1099static void encode_close(struct xdr_stream *xdr, const struct nfs_closeargs *arg, struct compound_hdr *hdr)
1100{
1101 encode_op_hdr(xdr, OP_CLOSE, decode_close_maxsz, hdr);
1102 encode_nfs4_seqid(xdr, arg->seqid);
1103 encode_nfs4_stateid(xdr, arg->stateid);
1104}
1105
1106static void encode_commit(struct xdr_stream *xdr, const struct nfs_writeargs *args, struct compound_hdr *hdr)
1106static void encode_commit(struct xdr_stream *xdr, const struct nfs_commitargs *args, struct compound_hdr *hdr)
1107{
1108 __be32 *p;
1109
1110 encode_op_hdr(xdr, OP_COMMIT, decode_commit_maxsz, hdr);
1111 p = reserve_space(xdr, 12);
1112 p = xdr_encode_hyper(p, args->offset);
1113 *p = cpu_to_be32(args->count);
1114}

--- 1328 unchanged lines hidden (view full) ---

2443 encode_getfattr(xdr, args->bitmask, &hdr);
2444 encode_nops(&hdr);
2445}
2446
2447/*
2448 * a COMMIT request
2449 */
2450static void nfs4_xdr_enc_commit(struct rpc_rqst *req, struct xdr_stream *xdr,
1107{
1108 __be32 *p;
1109
1110 encode_op_hdr(xdr, OP_COMMIT, decode_commit_maxsz, hdr);
1111 p = reserve_space(xdr, 12);
1112 p = xdr_encode_hyper(p, args->offset);
1113 *p = cpu_to_be32(args->count);
1114}

--- 1328 unchanged lines hidden (view full) ---

2443 encode_getfattr(xdr, args->bitmask, &hdr);
2444 encode_nops(&hdr);
2445}
2446
2447/*
2448 * a COMMIT request
2449 */
2450static void nfs4_xdr_enc_commit(struct rpc_rqst *req, struct xdr_stream *xdr,
2451 struct nfs_writeargs *args)
2451 struct nfs_commitargs *args)
2452{
2453 struct compound_hdr hdr = {
2454 .minorversion = nfs4_xdr_minorversion(&args->seq_args),
2455 };
2456
2457 encode_compound_hdr(xdr, req, &hdr);
2458 encode_sequence(xdr, &args->seq_args, &hdr);
2459 encode_putfh(xdr, args->fh, &hdr);

--- 1637 unchanged lines hidden (view full) ---

4097 return status;
4098}
4099
4100static int decode_verifier(struct xdr_stream *xdr, void *verifier)
4101{
4102 return decode_opaque_fixed(xdr, verifier, NFS4_VERIFIER_SIZE);
4103}
4104
2452{
2453 struct compound_hdr hdr = {
2454 .minorversion = nfs4_xdr_minorversion(&args->seq_args),
2455 };
2456
2457 encode_compound_hdr(xdr, req, &hdr);
2458 encode_sequence(xdr, &args->seq_args, &hdr);
2459 encode_putfh(xdr, args->fh, &hdr);

--- 1637 unchanged lines hidden (view full) ---

4097 return status;
4098}
4099
4100static int decode_verifier(struct xdr_stream *xdr, void *verifier)
4101{
4102 return decode_opaque_fixed(xdr, verifier, NFS4_VERIFIER_SIZE);
4103}
4104
4105static int decode_commit(struct xdr_stream *xdr, struct nfs_writeres *res)
4105static int decode_commit(struct xdr_stream *xdr, struct nfs_commitres *res)
4106{
4107 int status;
4108
4109 status = decode_op_hdr(xdr, OP_COMMIT);
4110 if (!status)
4111 status = decode_verifier(xdr, res->verf->verifier);
4112 return status;
4113}

--- 2234 unchanged lines hidden (view full) ---

6348out:
6349 return status;
6350}
6351
6352/*
6353 * Decode COMMIT response
6354 */
6355static int nfs4_xdr_dec_commit(struct rpc_rqst *rqstp, struct xdr_stream *xdr,
4106{
4107 int status;
4108
4109 status = decode_op_hdr(xdr, OP_COMMIT);
4110 if (!status)
4111 status = decode_verifier(xdr, res->verf->verifier);
4112 return status;
4113}

--- 2234 unchanged lines hidden (view full) ---

6348out:
6349 return status;
6350}
6351
6352/*
6353 * Decode COMMIT response
6354 */
6355static int nfs4_xdr_dec_commit(struct rpc_rqst *rqstp, struct xdr_stream *xdr,
6356 struct nfs_writeres *res)
6356 struct nfs_commitres *res)
6357{
6358 struct compound_hdr hdr;
6359 int status;
6360
6361 status = decode_compound_hdr(xdr, &hdr);
6362 if (status)
6363 goto out;
6364 status = decode_sequence(xdr, &res->seq_res, rqstp);

--- 737 unchanged lines hidden ---
6357{
6358 struct compound_hdr hdr;
6359 int status;
6360
6361 status = decode_compound_hdr(xdr, &hdr);
6362 if (status)
6363 goto out;
6364 status = decode_sequence(xdr, &res->seq_res, rqstp);

--- 737 unchanged lines hidden ---