diff options
author | Gaurav Kumar Garg <ggarg@redhat.com> | 2015-04-16 17:50:04 +0530 |
---|---|---|
committer | Kaushal M <kaushal@redhat.com> | 2015-04-29 00:00:18 -0700 |
commit | 9f7557a50584dd71e7d84cedf16d4937dc821f42 (patch) | |
tree | cbdd6e98eec8ca53457a6219f3c8f4961375478f | |
parent | de7c629d02b723e6b4c3d50a14ea5f072e27ccc1 (diff) |
cli,doc: man page of gluster (man gluster) should show bitrot command information
Currently when user type incorrent bitrot specific command then every
time cli error suggest wrong command to reuse.
With this fix it cli will suggest specific bitrot command when user type
wrong bitrot command.
With this fix it will also display bitrot command information in man page
by typing 'man gluster'
Change-Id: I7dbf31332a8cc0723e54e8a37fea0afe19d95e0e
BUG: 1207532
Signed-off-by: Gaurav Kumar Garg <ggarg@redhat.com>
Reviewed-on: http://review.gluster.org/10273
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Venky Shankar <vshankar@redhat.com>
Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
Tested-by: NetBSD Build System
Reviewed-by: Kaushal M <kaushal@redhat.com>
-rw-r--r-- | cli/src/cli-cmd-parser.c | 2 | ||||
-rw-r--r-- | cli/src/cli-cmd-volume.c | 25 | ||||
-rw-r--r-- | doc/gluster.8 | 13 |
3 files changed, 21 insertions, 19 deletions
diff --git a/cli/src/cli-cmd-parser.c b/cli/src/cli-cmd-parser.c index 74e8453dd6b..bb0af2fc383 100644 --- a/cli/src/cli-cmd-parser.c +++ b/cli/src/cli-cmd-parser.c @@ -4933,7 +4933,7 @@ cli_cmd_bitrot_parse (const char **words, int wordcount, dict_t **options) "scrub-throttle", "scrub-frequency", "scrub", NULL}; - char *scrub_throt_values[] = {"frozen", "lazy", "normal", + char *scrub_throt_values[] = {"lazy", "normal", "aggressive", NULL}; char *scrub_freq_values[] = {"daily", "weekly", "biweekly", "monthly", diff --git a/cli/src/cli-cmd-volume.c b/cli/src/cli-cmd-volume.c index 8b73c2e7840..30df22ff199 100644 --- a/cli/src/cli-cmd-volume.c +++ b/cli/src/cli-cmd-volume.c @@ -2669,25 +2669,14 @@ struct cli_cmd volume_cmds[] = { cli_cmd_volume_getopt_cbk, "Get the value of the all options or given option for volume <VOLNAME>" }, - {"volume bitrot <VOLNAME> {enable|disable}", + {"volume bitrot <VOLNAME> {enable|disable} |\n" + "volume bitrot <volname> scrub-throttle {lazy|normal|aggressive} |\n" + "volume bitrot <volname> scrub-frequency {daily|weekly|biweekly" + "|monthly} |\n" + "volume bitrot <volname> scrub {pause|resume}", cli_cmd_bitrot_cbk, - "Enable/disable bitrot for volume <VOLNAME>" - }, - {"volume bitrot <VOLNAME> {scrub-throttle frozen|lazy|normal" - "|aggressive}", - cli_cmd_bitrot_cbk, - "Scrub-throttle value is a measure of how fast or slow the scrubber " - "scrubs the filesystem for volume <VOLNAME>" - }, - {"volume bitrot <VOLNAME> {scrub-frequency daily|weekly|biweekly" - "|monthly", - cli_cmd_bitrot_cbk, - "Scrub frequency for volume <VOLNAME>" - }, - {"volume bitrot <VOLNAME> {scrub pause|resume}", - cli_cmd_bitrot_cbk, - "Pause/Resume scrub. Upon resume, scrubber continues where it " - "left off." + "Bitrot translator specific operation. For more information about " + "bitrot command type 'man gluster'" }, { NULL, NULL, NULL } }; diff --git a/doc/gluster.8 b/doc/gluster.8 index eed81400cb3..6402cdd2e03 100644 --- a/doc/gluster.8 +++ b/doc/gluster.8 @@ -105,6 +105,19 @@ Display the status of peers. .TP \fB\ peer help \fR Display help for the peer command. +.SS "Bitrot Commands" +.TP +\fB\ volume bitrot <VOLNAME> {enable|disable} \fR +Enable/disable bitrot for volume <VOLNAME> +.TP +\fB\ volume bitrot <VOLNAME> scrub-throttle {lazy|normal|aggressive} \fR +Scrub-throttle value is a measure of how fast or slow the scrubber scrubs the filesystem for volume <VOLNAME> +.TP +\fB\ volume bitrot <VOLNAME> scrub-frequency {daily|weekly|biweekly|monthly} \fR +Scrub frequency for volume <VOLNAME> +.TP +\fB\ volume bitrot <VOLNAME> scrub {pause|resume} \fR +Pause/Resume scrub. Upon resume, scrubber continues where it left off. .SS "Snapshot Commands" .PP .TP |