From 52e19c09a183d82d99f10c284bc8b27933b1d1fc Mon Sep 17 00:00:00 2001 From: Stanislav Kinsbursky Date: Wed, 14 Nov 2012 18:21:16 +0300 Subject: nfsd: make reclaim_str_hashtbl allocated per net This hash holds nfs4_clients info, which are network namespace aware. So let's make it allocated per network namespace. Note: this hash is used only by legacy tracker. So let's allocate hash in tracker init. Signed-off-by: Stanislav Kinsbursky Signed-off-by: J. Bruce Fields --- fs/nfsd/netns.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'fs/nfsd/netns.h') diff --git a/fs/nfsd/netns.h b/fs/nfsd/netns.h index 65c2431ea32..49e54790d86 100644 --- a/fs/nfsd/netns.h +++ b/fs/nfsd/netns.h @@ -24,6 +24,11 @@ #include #include +/* Hash tables for nfs4_clientid state */ +#define CLIENT_HASH_BITS 4 +#define CLIENT_HASH_SIZE (1 << CLIENT_HASH_BITS) +#define CLIENT_HASH_MASK (CLIENT_HASH_SIZE - 1) + struct cld_net; struct nfsd_net { @@ -38,6 +43,13 @@ struct nfsd_net { struct lock_manager nfsd4_manager; bool grace_ended; time_t boot_time; + + /* + * reclaim_str_hashtbl[] holds known client info from previous reset/reboot + * used in reboot/reset lease grace period processing + */ + struct list_head *reclaim_str_hashtbl; + int reclaim_str_hashtbl_size; }; extern int nfsd_net_id; -- cgit v1.2.3