aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfsd/netns.h
diff options
context:
space:
mode:
authorStanislav Kinsbursky <skinsbursky@parallels.com>2012-11-14 10:21:46 -0500
committerJ. Bruce Fields <bfields@redhat.com>2012-11-15 07:40:47 -0500
commit20e9e2bc98b907efe82621797c561f6169d63d96 (patch)
treed3325479970ab864d03df647fe2e1e447563d46a /fs/nfsd/netns.h
parent9b5311374057e5c87017ea3756e566047c9b61e7 (diff)
nfsd: make lockowner_ino_hashtbl allocated per net
This hash holds file lock owners and closely associated with nfs4_clients info, which are network namespace aware. So let's make it allocated per network namespace too. Note: this hash can be allocated in per-net operations. But it looks better to allocate it on nfsd state start and thus don't waste resources if server is not running. Signed-off-by: Stanislav Kinsbursky <skinsbursky@parallels.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'fs/nfsd/netns.h')
-rw-r--r--fs/nfsd/netns.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/nfsd/netns.h b/fs/nfsd/netns.h
index 46cca9494c7a..2281f6df5573 100644
--- a/fs/nfsd/netns.h
+++ b/fs/nfsd/netns.h
@@ -29,6 +29,9 @@
29#define CLIENT_HASH_SIZE (1 << CLIENT_HASH_BITS) 29#define CLIENT_HASH_SIZE (1 << CLIENT_HASH_BITS)
30#define CLIENT_HASH_MASK (CLIENT_HASH_SIZE - 1) 30#define CLIENT_HASH_MASK (CLIENT_HASH_SIZE - 1)
31 31
32#define LOCKOWNER_INO_HASH_BITS 8
33#define LOCKOWNER_INO_HASH_SIZE (1 << LOCKOWNER_INO_HASH_BITS)
34
32struct cld_net; 35struct cld_net;
33 36
34struct nfsd_net { 37struct nfsd_net {
@@ -61,6 +64,7 @@ struct nfsd_net {
61 struct list_head *unconf_id_hashtbl; 64 struct list_head *unconf_id_hashtbl;
62 struct rb_root unconf_name_tree; 65 struct rb_root unconf_name_tree;
63 struct list_head *ownerstr_hashtbl; 66 struct list_head *ownerstr_hashtbl;
67 struct list_head *lockowner_ino_hashtbl;
64}; 68};
65 69
66extern int nfsd_net_id; 70extern int nfsd_net_id;