diff options
author | Niels de Vos <ndevos@redhat.com> | 2015-07-13 12:14:53 +0200 |
---|---|---|
committer | Niels de Vos <ndevos@redhat.com> | 2015-07-18 01:35:16 -0700 |
commit | 3d6dacd69ca439e338ad59bfab53ce6c72b028d0 (patch) | |
tree | 634547c871ba26a35dcc01212f8d2fefdddc0412 /xlators/nfs/server/src/auth-cache.h | |
parent | 0cd03d6fc98ee103d05fe80887bd471503575723 (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.
Cherry picked from commit 67f7562b5cc9e42774d1dc569471f86f61eef040:
> 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>
Change-Id: Ic165221d72f11832177976c989823d861cf12f01
BUG: 1242515
Signed-off-by: Niels de Vos <ndevos@redhat.com>
Reviewed-on: http://review.gluster.org/11645
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.h | 1 |
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 */ }; |