diff options
author | Santosh Kumar Pradhan <spradhan@redhat.com> | 2013-10-28 12:46:37 +0530 |
---|---|---|
committer | Anand Avati <avati@redhat.com> | 2013-11-14 16:07:02 -0800 |
commit | e479660d9dd8bf7017c7dc78ccfa6edd9c51ec7a (patch) | |
tree | 96d4e58b53bef4fddb9455a21deff47ab841a75d /libglusterfs/src/gidcache.c | |
parent | 2990befa4cf9219f33b21b6c50d3e2afa4b7461b (diff) | |
download | glusterfs-e479660d9dd8bf7017c7dc78ccfa6edd9c51ec7a.tar.gz glusterfs-e479660d9dd8bf7017c7dc78ccfa6edd9c51ec7a.tar.xz glusterfs-e479660d9dd8bf7017c7dc78ccfa6edd9c51ec7a.zip |
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 <spradhan@redhat.com>
Reviewed-on: http://review.gluster.org/6236
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Rajesh Joseph <rjoseph@redhat.com>
Reviewed-by: Anand Avati <avati@redhat.com>
Diffstat (limited to 'libglusterfs/src/gidcache.c')
-rw-r--r-- | libglusterfs/src/gidcache.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/libglusterfs/src/gidcache.c b/libglusterfs/src/gidcache.c index c55ed2581b..c5bdda9259 100644 --- a/libglusterfs/src/gidcache.c +++ b/libglusterfs/src/gidcache.c @@ -35,6 +35,21 @@ int gid_cache_init(gid_cache_t *cache, uint32_t timeout) } /* + * 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 * release (unlock) the cache as soon as possible. |