[pnfs] (no subject)

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


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

Add the nfs41_sessions.h file in include/linux


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

diff --git a/include/linux/nfs41_sessions.h b/include/linux/nfs41_sessions.h
new file mode 100644
index 0000000..02f45db
--- /dev/null
+++ b/include/linux/nfs41_sessions.h
@@ -0,0 +1,72 @@
+#ifndef __NFS4_1_SESSIONS_H__
+#define __NFS4_1_SESSIONS_H__
+
+/* The flags for the nfs4_slot struct */
+#define NFS4_SLOT_BUSY		0X0	/* Slot in use */
+#define NFS4_SLOT_RECLAIMED	0x1	/* Slot has been reclaimed by
+					   the server */
+
+typedef unsigned char	 	sessionid_t[16];
+typedef u32			streamchannel_attrs;
+typedef u32			rdmachannel_attrs;
+
+struct nfs4_channel_attrs {
+	u32			max_rqst_sz;
+	u32			max_resp_sz;
+	u32			max_resp_sz_cached;
+	u32			max_ops;
+	u32			max_reqs;
+	streamchannel_attrs	stream_attrs;
+	rdmachannel_attrs	rdma_attrs;
+};
+
+struct nfs4_slot {
+	u32		 	slot_nr;
+	u32		 	seq_nr;
+	unsigned long		flags;
+	u32	 		nr_waiters;
+	spinlock_t		slot_lock;
+};
+
+struct nfs4_slot_table {
+	struct nfs4_slot	*slots;
+	u32			max_slots;
+	spinlock_t		slot_tbl_lock;
+};
+
+struct nfs4_channel {
+	struct nfs4_channel_attrs 	chan_attrs;
+	struct rpc_clnt 		*rpc_client;
+	struct nfs4_slot_table		slot_table;
+};
+
+struct nfs4_session {
+	/* Session related params */
+	sessionid_t			sess_id;
+	u32				seqid;	/* The seqid returned by 
+						   exchange_id */
+	u32				persist;
+	u32				header_padding;
+	u32				hash_alg;
+	u32				ssv_len;
+	u32				use_for_back_chan;
+	u32				rdma_mode;
+
+	/* The fore and back channel */
+	struct nfs4_channel		fore_channel;
+	struct nfs4_channel		back_channel;
+
+	unsigned int			expired;
+	struct nfs4_client *		client;
+	struct list_head		session_hashtbl;
+	spinlock_t 			session_lock;
+	/* To prevent races between create_session and sequence */
+	int 				mutating;
+	struct semaphore		session_sem;
+	atomic_t			ref_count;
+};
+
+
+#endif
+
+


More information about the pNFS mailing list