diff options
author | karthik-us <ksubrahm@redhat.com> | 2020-04-02 13:03:35 +0530 |
---|---|---|
committer | karthik-us <ksubrahm@redhat.com> | 2020-04-07 09:56:33 +0530 |
commit | e1ad1483e0e82d70fcc32311b7842bc9a77c04aa (patch) | |
tree | 4584b5a6266f7b0918adc5059cae6a38a4b515e8 /cli | |
parent | f2d90013aaa4652dbcc1e6e3d62a0d31ada89d5d (diff) |
cluster/afr: Removing unsupported options from code base to improve coverage
Support for gluster volume heal <volname> info healed/heal-failed
was removed by commit bb02cfb56ae08f56df4452c2b948fa962ae1212b in
release-3.6. cli parser will display the usage message in all the
supported versions whenever these clis are run, leading to some
dead code in the latest branches. Since support for these clis
were removed long back, this should not give any backward
compatibility issues as well. Hence removing the dead code from
the code base which will lead to better code coverage by the
regression runs as well.
Updates: #1052
Change-Id: I0c2b061469caf233c06d9699b0d159ce48e240b9
Signed-off-by: karthik-us <ksubrahm@redhat.com>
Diffstat (limited to 'cli')
-rw-r--r-- | cli/src/cli-cmd-parser.c | 2 | ||||
-rw-r--r-- | cli/src/cli-rpc-ops.c | 16 |
2 files changed, 4 insertions, 14 deletions
diff --git a/cli/src/cli-cmd-parser.c b/cli/src/cli-cmd-parser.c index 875f1c3fbe3..34620b4a31b 100644 --- a/cli/src/cli-cmd-parser.c +++ b/cli/src/cli-cmd-parser.c @@ -3906,8 +3906,6 @@ heal_command_type_get(const char *command) [GF_SHD_OP_HEAL_INDEX] = NULL, [GF_SHD_OP_HEAL_FULL] = "full", [GF_SHD_OP_INDEX_SUMMARY] = "info", - [GF_SHD_OP_HEALED_FILES] = NULL, - [GF_SHD_OP_HEAL_FAILED_FILES] = NULL, [GF_SHD_OP_SPLIT_BRAIN_FILES] = NULL, [GF_SHD_OP_STATISTICS] = "statistics", [GF_SHD_OP_STATISTICS_HEAL_COUNT] = NULL, diff --git a/cli/src/cli-rpc-ops.c b/cli/src/cli-rpc-ops.c index 3205f2895b1..7c7151568ef 100644 --- a/cli/src/cli-rpc-ops.c +++ b/cli/src/cli-rpc-ops.c @@ -7926,8 +7926,6 @@ gf_is_cli_heal_get_command(gf_xl_afr_op_t heal_op) [GF_SHD_OP_HEAL_INDEX] = 0, [GF_SHD_OP_HEAL_FULL] = 0, [GF_SHD_OP_INDEX_SUMMARY] = 1, - [GF_SHD_OP_HEALED_FILES] = 1, - [GF_SHD_OP_HEAL_FAILED_FILES] = 1, [GF_SHD_OP_SPLIT_BRAIN_FILES] = 1, [GF_SHD_OP_STATISTICS] = 1, [GF_SHD_OP_STATISTICS_HEAL_COUNT] = 1, @@ -8014,12 +8012,6 @@ gf_cli_heal_volume_cbk(struct rpc_req *req, struct iovec *iov, int count, case GF_SHD_OP_INDEX_SUMMARY: heal_op_str = "list of entries to be healed"; break; - case GF_SHD_OP_HEALED_FILES: - heal_op_str = "list of healed entries"; - break; - case GF_SHD_OP_HEAL_FAILED_FILES: - heal_op_str = "list of heal failed entries"; - break; case GF_SHD_OP_SPLIT_BRAIN_FILES: heal_op_str = "list of split brain entries"; break; @@ -8032,12 +8024,14 @@ gf_cli_heal_volume_cbk(struct rpc_req *req, struct iovec *iov, int count, case GF_SHD_OP_STATISTICS_HEAL_COUNT_PER_REPLICA: heal_op_str = "count of entries to be healed per replica"; break; - /* The below 4 cases are never hit; they're coded only to make - * compiler warnings go away.*/ case GF_SHD_OP_SBRAIN_HEAL_FROM_BIGGER_FILE: case GF_SHD_OP_SBRAIN_HEAL_FROM_LATEST_MTIME: case GF_SHD_OP_SBRAIN_HEAL_FROM_BRICK: case GF_SHD_OP_HEAL_SUMMARY: + case GF_SHD_OP_HEALED_FILES: + case GF_SHD_OP_HEAL_FAILED_FILES: + /* These cases are never hit; they're coded just to silence the + * compiler warnings.*/ break; case GF_SHD_OP_INVALID: @@ -8112,8 +8106,6 @@ gf_cli_heal_volume_cbk(struct rpc_req *req, struct iovec *iov, int count, cmd_heal_volume_statistics_heal_count_out(dict, i); break; case GF_SHD_OP_INDEX_SUMMARY: - case GF_SHD_OP_HEALED_FILES: - case GF_SHD_OP_HEAL_FAILED_FILES: case GF_SHD_OP_SPLIT_BRAIN_FILES: for (i = 0; i < brick_count; i++) cmd_heal_volume_brick_out(dict, i); |