[pnfs] (no subject)

iyer at netapp.com iyer at netapp.com
Fri Mar 16 18:16:51 EDT 2007


From: iyer <iyer at netapp.com>
Date: Wed, 14 Mar 2007 18:30:01 -0800
Subject: [PATCH 4/8] Slot Table Implementation

Put in the values from the slot table values rather than hard coded values


Signed-off-by: iyer <iyer at netapp.com>
---


diff --git a/fs/nfs/nfs4xdr.c b/fs/nfs/nfs4xdr.c
index 5ef6d70..7da9a6a 100644
--- a/fs/nfs/nfs4xdr.c
+++ b/fs/nfs/nfs4xdr.c
@@ -1429,20 +1429,22 @@ static int encode_create_session(struct xdr_stream *xdr, struct nfs41_create_ses
 	RESERVE_SPACE(2*28);                    /* 2 channel_attrs */
 
 	/* Fore Channel */
-	WRITE32(32768);                         /* max req size */
-	WRITE32(32768);                         /* max resp size */
-	WRITE32(32768);                         /* Max resp size cached */
-	WRITE32(RPC_DEF_SLOT_TABLE);            /* max operations */
-	WRITE32(RPC_DEF_SLOT_TABLE);            /* max requests */
+	WRITE32(args->fc_attrs.max_rqst_sz);	/* max req size */
+	WRITE32(args->fc_attrs.max_resp_sz);	/* max resp size */
+	WRITE32(args->fc_attrs.max_resp_sz_cached);	/* Max resp sz cached */
+	WRITE32(args->fc_attrs.max_ops);	/* max operations */
+	WRITE32(args->fc_attrs.max_reqs);	/* max requests */
+
 	WRITE32(0);                             /* Streamchannel attrs */
 	WRITE32(0);                             /*rdmachannel_attrs */
 
 	/* Back Channel */
-	WRITE32(32768);                         /* max req size */
-	WRITE32(32768);                         /* max resp size */
-	WRITE32(32768);                         /* Max resp size cached */
-	WRITE32(RPC_DEF_SLOT_TABLE);            /* max operations */
-	WRITE32(RPC_DEF_SLOT_TABLE);            /* max requests */
+	WRITE32(args->bc_attrs.max_rqst_sz);	/* max req size */
+	WRITE32(args->bc_attrs.max_resp_sz);	/* max resp size */
+	WRITE32(args->bc_attrs.max_resp_sz_cached);	/* Max resp sz cached */
+	WRITE32(args->bc_attrs.max_ops);	/* max operations */
+	WRITE32(args->bc_attrs.max_reqs);	/* max requests */
+
 	WRITE32(0);                             /* Streamchannel attrs */
 	WRITE32(0);                             /*rdmachannel_attrs */
 
@@ -6404,7 +6406,7 @@ static int nfs41_xdr_dec_get_lease_time(struct rpc_rqst *rqstp, uint32_t *p, str
 		status = decode_putrootfh(&xdr);
 	if (!status)
 		status = decode_fsinfo(&xdr, res->fsinfo);
-	if (!status)
+	if (status)
 		status = -nfs_stat_to_errno(hdr.status);
 	return status;
 }


More information about the pNFS mailing list