summaryrefslogtreecommitdiffstats
path: root/xlators/performance/nl-cache/src/nl-cache.c
diff options
context:
space:
mode:
authorPoornima G <pgurusid@redhat.com>2017-04-25 15:04:34 +0530
committerNiels de Vos <ndevos@redhat.com>2017-04-26 09:02:06 +0000
commit22e942dd201734761f37eaf9b10970e7da9d9a14 (patch)
treeb7c6121de3d8fb91ddf6ca8773ed9607acc3bb10 /xlators/performance/nl-cache/src/nl-cache.c
parent4076b73b2f4fb3cca0737974b124f33f76f9c9c1 (diff)
nl-cache: Fix the issue in refd_inode counting and prune the cache
Change-Id: I5b9beb8502667bc3876385900bc01b6491348716 BUG: 1442569 Signed-off-by: Poornima G <pgurusid@redhat.com> Reviewed-on: https://review.gluster.org/17110 Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> Tested-by: Pranith Kumar Karampuri <pkarampu@redhat.com> Smoke: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Niels de Vos <ndevos@redhat.com>
Diffstat (limited to 'xlators/performance/nl-cache/src/nl-cache.c')
-rw-r--r--xlators/performance/nl-cache/src/nl-cache.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/xlators/performance/nl-cache/src/nl-cache.c b/xlators/performance/nl-cache/src/nl-cache.c
index a34b752d260..f301b2d06dd 100644
--- a/xlators/performance/nl-cache/src/nl-cache.c
+++ b/xlators/performance/nl-cache/src/nl-cache.c
@@ -55,6 +55,8 @@ nlc_dentry_op (call_frame_t *frame, xlator_t *this, gf_boolean_t multilink)
default:
return;
}
+
+ nlc_lru_prune (this, NULL);
out:
return;
}
@@ -765,10 +767,10 @@ struct volume_options options[] = {
"a while and the cache is cleared based on LRU",
},
{ .key = {"nl-cache-timeout"},
- .type = GF_OPTION_TYPE_INT,
+ .type = GF_OPTION_TYPE_TIME,
.min = 0,
- .max = 600,
- .default_value = "600",
+ .max = 1 * GF_DAY_IN_SECONDS,
+ .default_value = "60",
.description = "Time period after which cache has to be refreshed",
},
{ .key = {NULL} },