summaryrefslogtreecommitdiffstats
path: root/xlators/nfs/server/src/auth-cache.h
diff options
context:
space:
mode:
authorNiels de Vos <ndevos@redhat.com>2015-05-31 14:39:51 +0200
committerNiels de Vos <ndevos@redhat.com>2015-06-28 10:37:04 -0700
commit67f7562b5cc9e42774d1dc569471f86f61eef040 (patch)
tree193d756065ad454a78c8d9e98aa0d1995b4dde09 /xlators/nfs/server/src/auth-cache.h
parent5f76ff1beaaf1fd1c85c43a166c289f9094a379b (diff)
nfs: add a gf_lock_t for the auth_cache->cache_dict
This is the 1st step towards implementing reference counters for the auth_cache_entry structure. Access to the structures should always be done atomically, but this can not be guaranteed by the a dict. Change-Id: Ic165221d72f11832177976c989823d861cf12f01 BUG: 1226717 Signed-off-by: Niels de Vos <ndevos@redhat.com> Reviewed-on: http://review.gluster.org/11021 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: jiffin tony Thottan <jthottan@redhat.com>
Diffstat (limited to 'xlators/nfs/server/src/auth-cache.h')
-rw-r--r--xlators/nfs/server/src/auth-cache.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/xlators/nfs/server/src/auth-cache.h b/xlators/nfs/server/src/auth-cache.h
index 5f2f03c1cb8..a3ea5a43ded 100644
--- a/xlators/nfs/server/src/auth-cache.h
+++ b/xlators/nfs/server/src/auth-cache.h
@@ -22,6 +22,7 @@
#include "nfs3.h"
struct auth_cache {
+ gf_lock_t lock; /* locking for the dict (and entries) */
dict_t *cache_dict; /* Dict holding fh -> authcache_entry */
time_t ttl_sec; /* TTL of the auth cache in seconds */
};