From 6e423ca7903e67214ce35ee9c308b82057530abf Mon Sep 17 00:00:00 2001 From: Sachin Pandit Date: Thu, 25 Sep 2014 08:32:52 +0530 Subject: USS : Decide the log entry based on the type of graph. Problem : When a lookup is issued, and if the entry is not found then snapview-client will log failure stating that "Lookup on normal graph failed with error Stale file handle" irrespective of type of graph it received call back from. Solution : Introduced a check to find out the graph from which the snapview-client received call-back. > Change-Id: Iadd5b525c394be3675d40231711058e1cf1396cd > BUG: 1146479 > Signed-off-by: Sachin Pandit > Reviewed-on: http://review.gluster.org/8851 > Reviewed-by: Raghavendra Bhat > Tested-by: Gluster Build System > Reviewed-by: Vijay Bellur > Signed-off-by: Raghavendra Bhat Change-Id: I6971d3e2a44db14431205b4c14cffd86a79de51f BUG: 1174639 Signed-off-by: Raghavendra Bhat Reviewed-on: http://review.gluster.org/9281 Tested-by: Gluster Build System Reviewed-by: Sachin Pandit --- xlators/features/snapview-client/src/snapview-client.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/xlators/features/snapview-client/src/snapview-client.c b/xlators/features/snapview-client/src/snapview-client.c index c9077351007..608081b1c30 100644 --- a/xlators/features/snapview-client/src/snapview-client.c +++ b/xlators/features/snapview-client/src/snapview-client.c @@ -164,11 +164,18 @@ svc_lookup_cbk (call_frame_t *frame, void *cookie, xlator_t *this, } } - gf_log (this->name, - (op_errno == ENOENT)?GF_LOG_DEBUG:GF_LOG_ERROR, - "Lookup on normal graph failed with error %s", - strerror (op_errno)); - goto out; + if (subvolume == FIRST_CHILD (this)) { + gf_log (this->name, + (op_errno == ENOENT)?GF_LOG_DEBUG:GF_LOG_ERROR, + "Lookup failed on normal graph with error %s", + strerror (op_errno)); + } else { + gf_log (this->name, + (op_errno == ENOENT)?GF_LOG_DEBUG:GF_LOG_ERROR, + "Lookup failed on snapview graph with error %s", + strerror (op_errno)); + } + goto out; } if (local->loc.parent) -- cgit