From ec86167d09bcbb763e31b73fb3d688efaa5444d7 Mon Sep 17 00:00:00 2001 From: Ravishankar N Date: Tue, 30 May 2017 10:18:04 +0530 Subject: nl-cache: Remove null check validation for frame->local in lookup cbk For nameless lookups, nl-cache does not init frame local, so the cbk throws up messages like these flooding the logs, especially whenenver gfid lookup on '/' is done (i.e. loc.path="/" and loc.gfid=1). [2017-05-30 04:35:31.628443] E [nl-cache.c:201:nlc_lookup_cbk] (-->/usr/lib64/glusterfs/3.8.4/xlator/performance/io-cache.so(+0x3d81) [0x7f0883005d81] -->/usr/lib64/glusterfs/3.8.4/xlator/performance/quick-read.so(+0x3127) [0x7f0882dfb127] -->/usr/lib64/glusterfs/3.8.4/xlator/performance/nl-cache.so(+0x4cd3) [0x7f08829e0cd3] ) 0-distrep-nl-cache: invalid argument: local [Invalid argument] Fixed it. Change-Id: I21cb44a9d2a324617e43f46fed83c9a0942d3a0b BUG: 1456653 Signed-off-by: Ravishankar N Reviewed-on: https://review.gluster.org/17417 Tested-by: Pranith Kumar Karampuri Smoke: Gluster Build System Reviewed-by: Poornima G NetBSD-regression: NetBSD Build System CentOS-regression: Gluster Build System --- xlators/performance/nl-cache/src/nl-cache.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'xlators/performance') diff --git a/xlators/performance/nl-cache/src/nl-cache.c b/xlators/performance/nl-cache/src/nl-cache.c index 8a130dc2355..a72f03993aa 100644 --- a/xlators/performance/nl-cache/src/nl-cache.c +++ b/xlators/performance/nl-cache/src/nl-cache.c @@ -198,7 +198,8 @@ nlc_lookup_cbk (call_frame_t *frame, void *cookie, xlator_t *this, local = frame->local; conf = this->private; - GF_VALIDATE_OR_GOTO (this->name, local, out); + if (!local) + goto out; /* Donot add to pe, this may lead to duplicate entry and * requires search before adding if list of strings */ -- cgit