Blob Blame History Raw
From 994bcc0ca9b371172ae19ee339e788da2072940b Mon Sep 17 00:00:00 2001
From: Ravishankar N <ravishankar@redhat.com>
Date: Tue, 30 May 2017 10:18:04 +0530
Subject: [PATCH 493/509] nl-cache: Remove null check validation for
 frame->local in lookup cbk

Upstream patch: https://review.gluster.org/17417

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: 1459756
Signed-off-by: Ravishankar N <ravishankar@redhat.com>
Reviewed-on: https://code.engineering.redhat.com/gerrit/107930
Tested-by: Poornima Gurusiddaiah <pgurusid@redhat.com>
Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
---
 xlators/performance/nl-cache/src/nl-cache.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/xlators/performance/nl-cache/src/nl-cache.c b/xlators/performance/nl-cache/src/nl-cache.c
index 8a130dc..a72f039 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 */
-- 
1.8.3.1