summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src/glusterd-utils.c
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-utils.c')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-utils.c31
1 files changed, 31 insertions, 0 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-utils.c b/xlators/mgmt/glusterd/src/glusterd-utils.c
index a22bc3ba7df..f38c16fa9a6 100644
--- a/xlators/mgmt/glusterd/src/glusterd-utils.c
+++ b/xlators/mgmt/glusterd/src/glusterd-utils.c
@@ -7389,6 +7389,8 @@ glusterd_volume_status_copy_to_op_ctx_dict (dict_t *aggr, dict_t *rsp_dict)
int32_t node_count = 0;
int32_t other_count = 0;
int32_t brick_index_max = -1;
+ int32_t hot_brick_count = -1;
+ int32_t type = -1;
int32_t rsp_node_count = 0;
int32_t rsp_other_count = 0;
int vol_count = -1;
@@ -7485,6 +7487,35 @@ glusterd_volume_status_copy_to_op_ctx_dict (dict_t *aggr, dict_t *rsp_dict)
goto out;
}
+ ret = dict_get_int32 (rsp_dict, "hot_brick_count", &hot_brick_count);
+ if (ret) {
+ gf_log (THIS->name, GF_LOG_ERROR,
+ "Failed to get hot brick count from rsp_dict");
+ goto out;
+ }
+
+ ret = dict_set_int32 (ctx_dict, "hot_brick_count",
+ node_count + rsp_node_count);
+ if (ret) {
+ gf_log (THIS->name, GF_LOG_ERROR,
+ "Failed to update hot_brick_count");
+ goto out;
+ }
+
+ ret = dict_get_int32 (rsp_dict, "type", &type);
+ if (ret) {
+ gf_log (THIS->name, GF_LOG_ERROR,
+ "Failed to get type from rsp_dict");
+ goto out;
+ }
+
+ ret = dict_set_int32 (ctx_dict, "type", type);
+ if (ret) {
+ gf_log (THIS->name, GF_LOG_ERROR,
+ "Failed to update type");
+ goto out;
+ }
+
aggregate_tasks:
/* Tasks are only present for a normal status command for a volume or
* for an explicit tasks status command for a volume