[pnfs] [PATCH 2/5] Update client exchange id to draft 13
andros at umich.edu
andros at umich.edu
Tue Sep 11 15:56:10 EDT 2007
From: Andy Adamson <andros at umich.edu>
Add zero length state_protect4_a
Signed off by: Andy Adamson<andros at umich.edu>
---
fs/nfs/nfs4xdr.c | 16 +++++++++++-----
include/linux/nfs4.h | 6 ++++++
2 files changed, 17 insertions(+), 5 deletions(-)
diff --git a/fs/nfs/nfs4xdr.c b/fs/nfs/nfs4xdr.c
index 2aee4da..789d03a 100644
--- a/fs/nfs/nfs4xdr.c
+++ b/fs/nfs/nfs4xdr.c
@@ -1571,8 +1571,9 @@ static int encode_exchange_id(struct xdr_stream *xdr, struct nfs41_exchange_id_a
encode_string(xdr, args->id_len, args->id);
- RESERVE_SPACE(8);
+ RESERVE_SPACE(12);
WRITE32(args->flags);
+ WRITE32(0); /* zero length state_protect4_a */
WRITE32(0); /* zero length implementation id array */
return 0;
@@ -5026,7 +5027,7 @@ static int decode_sequence(struct xdr_stream *xdr, struct nfs41_sequence_res *re
static int decode_exchange_id(struct xdr_stream *xdr, struct nfs41_exchange_id_res *res)
{
uint32_t *p;
- int status, implen;
+ int status, dummy;
struct nfs4_client *clp = res->client;
status = decode_op_hdr(xdr, OP_EXCHANGE_ID);
@@ -5035,10 +5036,15 @@ static int decode_exchange_id(struct xdr_stream *xdr, struct nfs41_exchange_id_r
READ_BUF(8);
READ64(clp->cl_clientid);
- READ_BUF(8);
+ READ_BUF(12);
READ32(clp->cl_session->seqid);
READ32(clp->cl_exchange_flags);
+ /* We ask for SP4_NONE */
+ READ32(dummy);
+ if (dummy != SP4_NONE)
+ return -EIO;
+
/* minor_id */
READ_BUF(8);
READ64(res->server_owner.minor_id);
@@ -5056,8 +5062,8 @@ static int decode_exchange_id(struct xdr_stream *xdr, struct nfs41_exchange_id_r
COPYMEM(res->server_scope.server_scope, res->server_scope.server_scope_sz);
/* Throw away Implementation id array */
READ_BUF(4);
- READ32(implen);
- p += XDR_QUADLEN(implen);
+ READ32(dummy);
+ p += XDR_QUADLEN(dummy);
return 0;
}
diff --git a/include/linux/nfs4.h b/include/linux/nfs4.h
index bdc55ed..291d078 100644
--- a/include/linux/nfs4.h
+++ b/include/linux/nfs4.h
@@ -521,6 +521,12 @@ enum filelayout_hint_care4 {
#define SESSION4_BACK_CHAN 0x002
#define SESSION4_RDMA 0x004
+enum state_protect_how4 {
+ SP4_NONE = 0,
+ SP4_MACH_CRED = 1,
+ SP4_SSV = 2
+};
+
#endif
#endif
--
1.5.0.2
More information about the pNFS
mailing list