path: root/xlators/mgmt/glusterd/src/glusterd-volume-set.c
diff options
authorPoornima G <>2017-05-26 15:45:57 +0530
committerAtin Mukherjee <>2017-06-13 05:01:17 +0000
commit7674584fa53944a4e982e217798f31a3d1ef313b (patch)
treee3729576373927b49409bcd6520f78aa579d46d5 /xlators/mgmt/glusterd/src/glusterd-volume-set.c
parent05b2fbd077cadc409994762e346ef94f4904545b (diff)
nl-cache: Fix a possible crash and stale cache
Issue1: Consider the followinf sequence of operations: ... nlc_ctx = nlc_ctx_get (inode i1) ....... -> nlc_clear_cache (i1) gets called as a part of nlc_invalidate or any other callers ... GF_FREE (ii nlc_ctx) LOCK (nlc_ctx->lock); -> This will result in crash as the ctx got freed in nlc_clear_cache. Issue2: lookup on dir1/file1 result in ENOENT add cache to dir1 at time T1 .... CHILD_DOWN at T2 lookup on dir1/file2 result in ENOENT add cache to dir1, but the cache time is still T1 lookup on dir1/file2 - should have been served from cache but the cache time is T1 < T2, hence cache is considered as invalid. So, after CHILD_DOWN the right thing would be to clear the cache and restart caching on that inode. Solution: Do not free nlc_ctx in nlc_clear_cache, but only in inode_forget() The fix for both issue1 and 2 is interleaved hence sending it as single patch. Change-Id: I83d8ed36c049a93567c6d7e63d045dc14ccbb397 BUG: 1458539 Signed-off-by: Poornima G <> Reviewed-on: Smoke: Gluster Build System <> NetBSD-regression: NetBSD Build System <> Reviewed-by: Pranith Kumar Karampuri <> CentOS-regression: Gluster Build System <>
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-volume-set.c')
1 files changed, 0 insertions, 1 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-volume-set.c b/xlators/mgmt/glusterd/src/glusterd-volume-set.c
index 900d4be2068..496b8db69f6 100644
--- a/xlators/mgmt/glusterd/src/glusterd-volume-set.c
+++ b/xlators/mgmt/glusterd/src/glusterd-volume-set.c
@@ -3376,7 +3376,6 @@ struct volopt_map_entry glusterd_volopt_map[] = {
{ .key = "",
.voltype = "performance/nl-cache",
- .value = "on",
.type = DOC,
.op_version = GD_OP_VERSION_3_11_0,