From e479660d9dd8bf7017c7dc78ccfa6edd9c51ec7a Mon Sep 17 00:00:00 2001 From: Santosh Kumar Pradhan Date: Mon, 28 Oct 2013 12:46:37 +0530 Subject: gNFS: RFE for NFS connection behavior Implement reconfigure() for NFS xlator so that volume set/reset wont restart the NFS server process. But few options can not be reconfigured dynamically e.g. nfs.mem-factor, nfs.port etc which needs NFS to be restarted. Change-Id: Ic586fd55b7933c0a3175708d8c41ed0475d74a1c BUG: 1027409 Signed-off-by: Santosh Kumar Pradhan Reviewed-on: http://review.gluster.org/6236 Tested-by: Gluster Build System Reviewed-by: Rajesh Joseph Reviewed-by: Anand Avati --- libglusterfs/src/gidcache.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'libglusterfs/src/gidcache.c') diff --git a/libglusterfs/src/gidcache.c b/libglusterfs/src/gidcache.c index c55ed2581..c5bdda925 100644 --- a/libglusterfs/src/gidcache.c +++ b/libglusterfs/src/gidcache.c @@ -34,6 +34,21 @@ int gid_cache_init(gid_cache_t *cache, uint32_t timeout) return 0; } +/* + * Reconfigure the cache timeout. + */ +int gid_cache_reconf(gid_cache_t *cache, uint32_t timeout) +{ + if (!cache) + return -1; + + LOCK(&cache->gc_lock); + cache->gc_max_age = timeout; + UNLOCK(&cache->gc_lock); + + return 0; +} + /* * Look up an ID in the cache. If found, return the actual cache entry to avoid * an additional allocation and memory copy. The caller should copy the data and -- cgit