From 0d4535c8db7b4be3fcee685d12f6974f7af89810 Mon Sep 17 00:00:00 2001 From: Sanju Rakonde Date: Thu, 3 Jan 2019 19:09:36 +0530 Subject: 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 --- xlators/mgmt/glusterd/src/glusterd-mgmt.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'xlators') 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); -- cgit