887953
From b415160bcf51c682c919776287c4c9a2b5a8221f Mon Sep 17 00:00:00 2001
887953
From: Sanju Rakonde <srakonde@redhat.com>
887953
Date: Thu, 3 Jan 2019 19:09:36 +0530
887953
Subject: [PATCH 501/501] glusterd: aggregate rsp from peers for profile
887953
 command
887953
887953
When we run profile info command, it should display statistics
887953
of all the bricks of the volume. To display information of bricks
887953
which are hosted on peers, we need to aggregate the response from
887953
peers.
887953
887953
For profile info command, all the statistics will be added into
887953
the dictionary in brick-op phase. To aggregate the information from
887953
peers, we need to call glusterd_syncop_aggr_rsp_dict() in brick-op
887953
call back function.
887953
887953
>upstream patch : https://review.gluster.org/#/c/glusterfs/+/21988
887953
>fixes: bz#1663223
887953
>Change-Id: I5f5890c3d01974747f829128ab74be6071f4aa30
887953
>Signed-off-by: Sanju Rakonde <srakonde@redhat.com>
887953
887953
BUG: 1663232
887953
Change-Id: I5f5890c3d01974747f829128ab74be6071f4aa30
887953
Signed-off-by: Sanju Rakonde <srakonde@redhat.com>
887953
Reviewed-on: https://code.engineering.redhat.com/gerrit/159818
887953
Tested-by: RHGS Build Bot <nigelb@redhat.com>
887953
Reviewed-by: Sunil Kumar Heggodu Gopala Acharya <sheggodu@redhat.com>
887953
---
887953
 xlators/mgmt/glusterd/src/glusterd-mgmt.c | 3 ++-
887953
 1 file changed, 2 insertions(+), 1 deletion(-)
887953
887953
diff --git a/xlators/mgmt/glusterd/src/glusterd-mgmt.c b/xlators/mgmt/glusterd/src/glusterd-mgmt.c
887953
index ef8a2d9..275059c 100644
887953
--- a/xlators/mgmt/glusterd/src/glusterd-mgmt.c
887953
+++ b/xlators/mgmt/glusterd/src/glusterd-mgmt.c
887953
@@ -1349,7 +1349,8 @@ gd_mgmt_v3_brick_op_cbk_fn (struct rpc_req *req, struct iovec *iov,
887953
         gf_uuid_copy (args->uuid, rsp.uuid);
887953
         pthread_mutex_lock (&args->lock_dict);
887953
         {
887953
-                if (rsp.op == GD_OP_DEFRAG_BRICK_VOLUME)
887953
+                if (rsp.op == GD_OP_DEFRAG_BRICK_VOLUME ||
887953
+                    rsp.op == GD_OP_PROFILE_VOLUME)
887953
                         ret = glusterd_syncop_aggr_rsp_dict (rsp.op, args->dict,
887953
                                                              rsp_dict);
887953
         }
887953
-- 
887953
1.8.3.1
887953