diff options
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-utils.c')
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-utils.c | 31 |
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 28bf54b99e9..593e32e95d0 100644 --- a/xlators/mgmt/glusterd/src/glusterd-utils.c +++ b/xlators/mgmt/glusterd/src/glusterd-utils.c @@ -7405,6 +7405,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; @@ -7501,6 +7503,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 |