From owner-svn-src-projects@FreeBSD.ORG Sat Dec 31 00:03:13 2011 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 844B4106564A; Sat, 31 Dec 2011 00:03:13 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 67BF68FC12; Sat, 31 Dec 2011 00:03:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBV03Dlh037130; Sat, 31 Dec 2011 00:03:13 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBV03DoZ037127; Sat, 31 Dec 2011 00:03:13 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201112310003.pBV03DoZ037127@svn.freebsd.org> From: Rick Macklem Date: Sat, 31 Dec 2011 00:03:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229048 - in projects/nfsv4.1-client/sys/fs: nfs nfsclient X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Dec 2011 00:03:13 -0000 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 */