From 67f7562b5cc9e42774d1dc569471f86f61eef040 Mon Sep 17 00:00:00 2001 From: Niels de Vos Date: Sun, 31 May 2015 14:39:51 +0200 Subject: 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 Reviewed-on: http://review.gluster.org/11021 Tested-by: NetBSD Build System Tested-by: Gluster Build System Reviewed-by: jiffin tony Thottan --- xlators/nfs/server/src/auth-cache.h | 1 + 1 file changed, 1 insertion(+) (limited to 'xlators/nfs/server/src/auth-cache.h') 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 */ }; -- cgit