summaryrefslogtreecommitdiffstats
path: root/xlators/nfs/server/src/auth-cache.h
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/nfs/server/src/auth-cache.h')
-rw-r--r--xlators/nfs/server/src/auth-cache.h25
1 files changed, 12 insertions, 13 deletions
diff --git a/xlators/nfs/server/src/auth-cache.h b/xlators/nfs/server/src/auth-cache.h
index 5f2f03c1cb8..4c9d09207f8 100644
--- a/xlators/nfs/server/src/auth-cache.h
+++ b/xlators/nfs/server/src/auth-cache.h
@@ -16,38 +16,37 @@
#define _AUTH_CACHE_H_
#include "nfs-mem-types.h"
-#include "mount3.h"
#include "exports.h"
-#include "dict.h"
+#include <glusterfs/dict.h>
#include "nfs3.h"
struct auth_cache {
- dict_t *cache_dict; /* Dict holding fh -> authcache_entry */
- time_t ttl_sec; /* TTL of the auth cache in seconds */
+ 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 */
};
-
/* Initializes the cache */
struct auth_cache *
-auth_cache_init (time_t ttl_sec);
+auth_cache_init(time_t ttl_sec);
/* Inserts FH into cache */
int
-cache_nfs_fh (struct auth_cache *cache, struct nfs3_fh *fh,
- const char *host_addr, struct export_item *export_item);
+cache_nfs_fh(struct auth_cache *cache, struct nfs3_fh *fh,
+ const char *host_addr, struct export_item *export_item);
/* Checks if the filehandle cached & writable */
gf_boolean_t
-is_nfs_fh_cached_and_writeable (struct auth_cache *cache, struct nfs3_fh *fh,
- const char *host_addr);
+is_nfs_fh_cached_and_writeable(struct auth_cache *cache, struct nfs3_fh *fh,
+ const char *host_addr);
/* Checks if the filehandle is cached */
gf_boolean_t
-is_nfs_fh_cached (struct auth_cache *cache, struct nfs3_fh *fh,
- const char *host_addr);
+is_nfs_fh_cached(struct auth_cache *cache, struct nfs3_fh *fh,
+ const char *host_addr);
/* Purge the cache */
void
-auth_cache_purge (struct auth_cache *cache);
+auth_cache_purge(struct auth_cache *cache);
#endif /* _AUTH_CACHE_H_ */