summaryrefslogtreecommitdiffstats
path: root/xlators/cluster
diff options
context:
space:
mode:
authorPranith Kumar K <pkarampu@redhat.com>2016-10-18 15:16:17 +0530
committerPranith Kumar Karampuri <pkarampu@redhat.com>2016-11-18 01:56:39 -0800
commit5310be8838f8db748a698bd3a98f8d00a4114e65 (patch)
treedcfdf14c322d8731cec0eafc7aa24bf1abbf6629 /xlators/cluster
parent2f70f47979d204d5ee29811f5f5fa61d0a52c3b1 (diff)
events: Add FMT_WARN for gf_event
Raghavendra G found that posix is trying to print %s but passing an int when HEALTH_CHECK fails in posix. These are the kind of bugs that should be caught at compilation itself. Also fixed the problematic gf_event() callers. BUG: 1386097 Change-Id: Id7bd6d9a9690237cec3ca1aefa2aac085e8a1270 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/15671 Smoke: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Atin Mukherjee <amukherj@redhat.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Diffstat (limited to 'xlators/cluster')
-rw-r--r--xlators/cluster/afr/src/afr-self-heal-common.c5
-rw-r--r--xlators/cluster/dht/src/dht-rebalance.c2
2 files changed, 5 insertions, 2 deletions
diff --git a/xlators/cluster/afr/src/afr-self-heal-common.c b/xlators/cluster/afr/src/afr-self-heal-common.c
index 556bc5d250e..b6720ccfa5c 100644
--- a/xlators/cluster/afr/src/afr-self-heal-common.c
+++ b/xlators/cluster/afr/src/afr-self-heal-common.c
@@ -1604,6 +1604,7 @@ afr_selfheal_unlocked_inspect (call_frame_t *frame, xlator_t *this,
int i = 0;
int valid_cnt = 0;
struct iatt first = {0, };
+ int first_idx = 0;
struct afr_reply *replies = NULL;
int ret = -1;
@@ -1643,6 +1644,7 @@ afr_selfheal_unlocked_inspect (call_frame_t *frame, xlator_t *this,
valid_cnt++;
if (valid_cnt == 1) {
first = replies[i].poststat;
+ first_idx = i;
continue;
}
@@ -1658,7 +1660,8 @@ afr_selfheal_unlocked_inspect (call_frame_t *frame, xlator_t *this,
"type=file;gfid=%s;"
"ia_type-%d=%s;ia_type-%d=%s",
this->name,
- uuid_utoa (replies[i].poststat.ia_gfid), first,
+ uuid_utoa (replies[i].poststat.ia_gfid),
+ first_idx,
gf_inode_type_to_str (first.ia_type), i,
gf_inode_type_to_str (replies[i].poststat.ia_type));
ret = -EIO;
diff --git a/xlators/cluster/dht/src/dht-rebalance.c b/xlators/cluster/dht/src/dht-rebalance.c
index e41a59e7bfc..df1bce3d8db 100644
--- a/xlators/cluster/dht/src/dht-rebalance.c
+++ b/xlators/cluster/dht/src/dht-rebalance.c
@@ -149,7 +149,7 @@ dht_send_rebalance_event (xlator_t *this, int cmd, gf_defrag_status_t status)
}
if (event != EVENT_LAST) {
- ret = gf_event (event, "volume=%s", volname);
+ gf_event (event, "volume=%s", volname);
}
GF_FREE (tmpstr);