diff options
author | Gaurav Kumar Garg <garg.gaurav52@gmail.com> | 2015-11-23 17:00:07 +0530 |
---|---|---|
committer | Atin Mukherjee <amukherj@redhat.com> | 2015-11-23 22:25:47 -0800 |
commit | 4348a6af89085cbdb41963f828b88deee4a109f1 (patch) | |
tree | 0c50f31509a765df4b18d46c21c139c2ac30736f /cli/src/cli-cmd-parser.c | |
parent | c93e436527e9d2ceed46b939e18edc40b7018cee (diff) |
glusterd/bitrot : Integration of bad files from bitd with scrub status command
Currently scrub status command is not displaying list of all the bad files. All
the bad files are avaliable in the bitd daemon.
With this patch it will dispaly list of all the bad file's in the scrub
status command.
Change-Id: If09babafaf5d7cf158fa79119abbf5b986027748
BUG: 1207627
Signed-off-by: Gaurav Kumar Garg <ggarg@redhat.com>
Reviewed-on: http://review.gluster.org/12720
Tested-by: NetBSD Build System <jenkins@build.gluster.org>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
Diffstat (limited to 'cli/src/cli-cmd-parser.c')
-rw-r--r-- | cli/src/cli-cmd-parser.c | 23 |
1 files changed, 5 insertions, 18 deletions
diff --git a/cli/src/cli-cmd-parser.c b/cli/src/cli-cmd-parser.c index ef07e88b795..c72f99db194 100644 --- a/cli/src/cli-cmd-parser.c +++ b/cli/src/cli-cmd-parser.c @@ -5180,23 +5180,6 @@ cli_cmd_bitrot_parse (const char **words, int wordcount, dict_t **options) } } - if ((strcmp (words[3], "scrub") == 0) && - (strcmp (words[4], "status") == 0)) { - if (wordcount == 5) { - type = GF_BITROT_CMD_SCRUB_STATUS; - ret = dict_set_str (dict, "scrub-value", - (char *) words[4]); - if (ret) { - cli_out ("Failed to set dict for scrub status"); - goto out; - } - goto set_type; - } else { - ret = -1; - goto out; - } - } - if (!strcmp (w, "scrub-throttle")) { if (!words[4]) { cli_err ("Missing scrub-throttle value for bitrot " @@ -5263,7 +5246,11 @@ cli_cmd_bitrot_parse (const char **words, int wordcount, dict_t **options) ret = -1; goto out; } else { - type = GF_BITROT_OPTION_TYPE_SCRUB; + if (strcmp (words[4], "status") == 0) { + type = GF_BITROT_CMD_SCRUB_STATUS; + } else { + type = GF_BITROT_OPTION_TYPE_SCRUB; + } ret = dict_set_str (dict, "scrub-value", (char *) words[4]); if (ret) { |