svn commit: r229048 - in projects/nfsv4.1-client/sys/fs: nfs
nfsclient
Rick Macklem
rmacklem at FreeBSD.org
Sat Dec 31 00:03:13 UTC 2011
Author: rmacklem
Date: Sat Dec 31 00:03:13 2011
New Revision: 229048
URL: http://svn.freebsd.org/changeset/base/229048
Log:
Move session related fields out of the nfsclclient and nfsmount
structures and into a separate structure. This will help prepare
the session code so that it can be used for Data Server (DS)
connections as well as the Metadata Server (MDS) connection.
Modified:
projects/nfsv4.1-client/sys/fs/nfs/nfsclstate.h
projects/nfsv4.1-client/sys/fs/nfsclient/nfsmount.h
Modified: projects/nfsv4.1-client/sys/fs/nfs/nfsclstate.h
==============================================================================
--- projects/nfsv4.1-client/sys/fs/nfs/nfsclstate.h Fri Dec 30 23:41:24 2011 (r229047)
+++ projects/nfsv4.1-client/sys/fs/nfs/nfsclstate.h Sat Dec 31 00:03:13 2011 (r229048)
@@ -44,17 +44,27 @@ LIST_HEAD(nfscldeleghash, nfscldeleg);
#define NFSCLDELEGHASH(c, f, l) \
(&((c)->nfsc_deleghash[ncl_hash((f), (l)) % NFSCLDELEGHASHSIZE]))
+/* Structure for NFSv4.1 session stuff. */
+struct nfsclsession {
+ struct mtx nfsess_mtx;
+ struct nfsslot nfsess_cbslots[NFSV4_CBSLOTS];
+ nfsquad_t nfsess_clientid;
+ uint32_t nfsess_slotseq[64]; /* Max for 64bit nm_slots */
+ uint64_t nfsess_slots;
+ uint32_t nfsess_sequenceid;
+ uint16_t nfsess_foreslots;
+ uint8_t nfsess_sessionid[NFSX_V4SESSIONID];
+};
+
struct nfsclclient {
LIST_ENTRY(nfsclclient) nfsc_list;
struct nfsclownerhead nfsc_owner;
struct nfscldeleghead nfsc_deleg;
struct nfscldeleghash nfsc_deleghash[NFSCLDELEGHASHSIZE];
struct nfsv4lock nfsc_lock;
- struct nfsslot nfsc_cbslots[NFSV4_CBSLOTS]; /* NFSv4.1 cb slot table */
- uint8_t nfsc_sessionid[NFSX_V4SESSIONID]; /* NFSv4.1 session id */
+ struct nfsclsession nfsc_sess;
struct proc *nfsc_renewthread;
struct nfsmount *nfsc_nmp;
- nfsquad_t nfsc_clientid;
time_t nfsc_expire;
u_int32_t nfsc_clientidrev;
u_int32_t nfsc_renew;
@@ -65,6 +75,15 @@ struct nfsclclient {
u_int8_t nfsc_id[1]; /* Malloc'd to correct length */
};
+#define nfsc_mtx nfsc_sess.nfsess_mtx
+#define nfsc_cbslots nfsc_sess.nfsess_cbslots
+#define nfsc_clientid nfsc_sess.nfsess_clientid
+#define nfsc_slotseq nfsc_sess.nfsess_slotseq
+#define nfsc_slots nfsc_sess.nfsess_slots
+#define nfsc_sequenceid nfsc_sess.nfsess_sequenceid
+#define nfsc_foreslots nfsc_sess.nfsess_foreslots
+#define nfsc_sessionid nfsc_sess.nfsess_sessionid
+
/*
* Bits for nfsc_flags.
*/
Modified: projects/nfsv4.1-client/sys/fs/nfsclient/nfsmount.h
==============================================================================
--- projects/nfsv4.1-client/sys/fs/nfsclient/nfsmount.h Fri Dec 30 23:41:24 2011 (r229047)
+++ projects/nfsv4.1-client/sys/fs/nfsclient/nfsmount.h Sat Dec 31 00:03:13 2011 (r229048)
@@ -74,10 +74,6 @@ struct nfsmount {
u_int64_t nm_clval; /* identifies which clientid */
u_int64_t nm_fsid[2]; /* NFSv4 fsid */
int nm_minorvers; /* Minor version # for NFSv4 */
- uint32_t nm_slotseq[64]; /* Max for 64bit nm_slots */
- uint64_t nm_slots; /* NFSv4.1 session slots */
- uint32_t nm_sequenceid; /* NFSv4.1 sequence number */
- u_int16_t nm_foreslots; /* Number of fore channel slots */
u_int16_t nm_krbnamelen; /* Krb5 host principal, if any */
u_int16_t nm_dirpathlen; /* and mount dirpath, for V4 */
u_int16_t nm_srvkrbnamelen; /* and the server's target name */
More information about the svn-src-projects
mailing list