summaryrefslogtreecommitdiffstats
path: root/xlators
diff options
context:
space:
mode:
authorRaghavendra Talur <rtalur@redhat.com>2016-02-15 18:16:04 +0530
committerVijay Bellur <vbellur@redhat.com>2016-04-27 12:26:31 -0700
commitc4d67a8338b42d6485f49999f310cbb9ed5359c5 (patch)
treed5896e698878f6f5630d08f85b52b77b853271a2 /xlators
parent302e218f68ef5edab6b369411d6f06cafea08ce1 (diff)
libglusterfs: Add debug and trace logs for stack trace
It has become very difficult to identify the xlator which returned negative op_ret. Being able to just change the log level and visualize the stack is helpful in such cases. Change-Id: I6545b4802c1ab4d0d230d5e9e036afb2384882e1 BUG: 1330052 Signed-off-by: Raghavendra Talur <rtalur@redhat.com> Reviewed-on: http://review.gluster.org/13448 CentOS-regression: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Smoke: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Jeff Darcy <jdarcy@redhat.com> Reviewed-by: Rajesh Joseph <rjoseph@redhat.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Diffstat (limited to 'xlators')
-rw-r--r--xlators/cluster/dht/src/dht-common.c3
-rw-r--r--xlators/cluster/stripe/src/stripe.c6
2 files changed, 5 insertions, 4 deletions
diff --git a/xlators/cluster/dht/src/dht-common.c b/xlators/cluster/dht/src/dht-common.c
index be568063bd2..3dea94d7376 100644
--- a/xlators/cluster/dht/src/dht-common.c
+++ b/xlators/cluster/dht/src/dht-common.c
@@ -3735,7 +3735,8 @@ dht_setxattr2 (xlator_t *this, xlator_t *subvol, call_frame_t *frame, int ret)
return 0;
err:
- DHT_STACK_UNWIND (setxattr, frame, local ? local->op_ret : -1, op_errno, NULL);
+ DHT_STACK_UNWIND (setxattr, frame, (local ? local->op_ret : -1),
+ op_errno, NULL);
return 0;
}
diff --git a/xlators/cluster/stripe/src/stripe.c b/xlators/cluster/stripe/src/stripe.c
index f6c3ea4e612..ae175faf811 100644
--- a/xlators/cluster/stripe/src/stripe.c
+++ b/xlators/cluster/stripe/src/stripe.c
@@ -4950,9 +4950,9 @@ out:
/* all entries are directories */
frame->local = NULL;
STRIPE_STACK_UNWIND (readdir, frame,
- local ? local->op_ret : -1,
- local ? local->op_errno : EINVAL,
- local ? &local->entries : NULL,
+ (local ? local->op_ret : -1),
+ (local ? local->op_errno : EINVAL),
+ (local ? &local->entries : NULL),
NULL);
gf_dirent_free (&local->entries);
stripe_local_wipe (local);