Commit 24d292b8 authored by Chuck Lever's avatar Chuck Lever Committed by Trond Myklebust

NFS: Move cl_state_owners and related fields to the nfs_server struct

NFSv4 migration needs to reassociate state owners from the source to
the destination nfs_server data structures.  To make that easier, move
the cl_state_owners field to the nfs_server struct.  cl_openowner_id
and cl_lockowner_id accompany this move, as they are used in
conjunction with cl_state_owners.

The cl_lock field in the parent nfs_client continues to protect all
three of these fields.
Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
Signed-off-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
parent fca5238e
......@@ -110,7 +110,7 @@ struct nfs_unique_id {
struct nfs4_state_owner {
struct nfs_unique_id so_owner_id;
struct nfs_server *so_server;
struct rb_node so_client_node;
struct rb_node so_server_node;
struct rpc_cred *so_cred; /* Associated cred */
......
This diff is collapsed.
......@@ -47,11 +47,7 @@ struct nfs_client {
u64 cl_clientid; /* constant */
unsigned long cl_state;
struct rb_root cl_openowner_id;
struct rb_root cl_lockowner_id;
struct list_head cl_delegations;
struct rb_root cl_state_owners;
spinlock_t cl_lock;
unsigned long cl_lease_time;
......@@ -150,6 +146,11 @@ struct nfs_server {
filesystem */
struct pnfs_layoutdriver_type *pnfs_curr_ld; /* Active layout driver */
struct rpc_wait_queue roc_rpcwaitq;
/* the following fields are protected by nfs_client->cl_lock */
struct rb_root state_owners;
struct rb_root openowner_id;
struct rb_root lockowner_id;
#endif
void (*destroy)(struct nfs_server *);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment