From b415160bcf51c682c919776287c4c9a2b5a8221f Mon Sep 17 00:00:00 2001 From: Sanju Rakonde Date: Thu, 3 Jan 2019 19:09:36 +0530 Subject: [PATCH 501/501] 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. >upstream patch : https://review.gluster.org/#/c/glusterfs/+/21988 >fixes: bz#1663223 >Change-Id: I5f5890c3d01974747f829128ab74be6071f4aa30 >Signed-off-by: Sanju Rakonde BUG: 1663232 Change-Id: I5f5890c3d01974747f829128ab74be6071f4aa30 Signed-off-by: Sanju Rakonde Reviewed-on: https://code.engineering.redhat.com/gerrit/159818 Tested-by: RHGS Build Bot Reviewed-by: Sunil Kumar Heggodu Gopala Acharya --- xlators/mgmt/glusterd/src/glusterd-mgmt.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/xlators/mgmt/glusterd/src/glusterd-mgmt.c b/xlators/mgmt/glusterd/src/glusterd-mgmt.c index ef8a2d9..275059c 100644 --- a/xlators/mgmt/glusterd/src/glusterd-mgmt.c +++ b/xlators/mgmt/glusterd/src/glusterd-mgmt.c @@ -1349,7 +1349,8 @@ gd_mgmt_v3_brick_op_cbk_fn (struct rpc_req *req, struct iovec *iov, 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); } -- 1.8.3.1