summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src/glusterd-mgmt.c
diff options
context:
space:
mode:
authorSanju Rakonde <srakonde@redhat.com>2019-01-03 19:09:36 +0530
committerAtin Mukherjee <amukherj@redhat.com>2019-01-03 14:58:30 +0000
commit0d4535c8db7b4be3fcee685d12f6974f7af89810 (patch)
treee1823403df261efff066e72049f66fa24ff859f4 /xlators/mgmt/glusterd/src/glusterd-mgmt.c
parent44f3382328b3bd12d3bbcdbfc408660eecf4befc (diff)
glusterd: aggregate rsp from peers for profile command
When we run profile info command, it should display statistics of all the bricks of the volume. To display information of bricks which are hosted on peers, we need to aggregate the response from peers. For profile info command, all the statistics will be added into the dictionary in brick-op phase. To aggregate the information from peers, we need to call glusterd_syncop_aggr_rsp_dict() in brick-op call back function. fixes: bz#1663223 Change-Id: I5f5890c3d01974747f829128ab74be6071f4aa30 Signed-off-by: Sanju Rakonde <srakonde@redhat.com>
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-mgmt.c')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-mgmt.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-mgmt.c b/xlators/mgmt/glusterd/src/glusterd-mgmt.c
index ae5be9c8768..175677e8e9f 100644
--- a/xlators/mgmt/glusterd/src/glusterd-mgmt.c
+++ b/xlators/mgmt/glusterd/src/glusterd-mgmt.c
@@ -1301,7 +1301,8 @@ gd_mgmt_v3_brick_op_cbk_fn(struct rpc_req *req, struct iovec *iov, int count,
gf_uuid_copy(args->uuid, rsp.uuid);
pthread_mutex_lock(&args->lock_dict);
{
- if (rsp.op == GD_OP_DEFRAG_BRICK_VOLUME)
+ if (rsp.op == GD_OP_DEFRAG_BRICK_VOLUME ||
+ rsp.op == GD_OP_PROFILE_VOLUME)
ret = glusterd_syncop_aggr_rsp_dict(rsp.op, args->dict, rsp_dict);
}
pthread_mutex_unlock(&args->lock_dict);