From 2736421b26ef03724297b62b4f07ad847c135709 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 --- xlators/features/snapview-client/src/snapview-client.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) (limited to 'xlators/features/snapview-client/src/snapview-client.c') 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