diff options
author | Pranith Kumar K <pkarampu@redhat.com> | 2018-01-02 20:53:27 +0530 |
---|---|---|
committer | gluster-ant <bugzilla-bot@gluster.org> | 2018-01-02 20:53:27 +0530 |
commit | 8510a24504efec36d40d4db57f959b444c355d0d (patch) | |
tree | e88b18448a3fd212bd98b31affcb095dadd59a1b | |
parent | aa6e0408b8e5db1c172e20fe8c1467114584a8d5 (diff) | |
download | glusterfs-8510a24504efec36d40d4db57f959b444c355d0d.tar.gz glusterfs-8510a24504efec36d40d4db57f959b444c355d0d.tar.xz glusterfs-8510a24504efec36d40d4db57f959b444c355d0d.zip |
debug/delay-gen: volume option fixes for GD2
Updates #302
Change-Id: I2c7ab85364337d0bc00428e0001ddc4038e08174
Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
-rw-r--r-- | xlators/debug/delay-gen/src/delay-gen.c | 14 | ||||
-rw-r--r-- | xlators/debug/error-gen/src/error-gen.c | 2 |
2 files changed, 15 insertions, 1 deletions
diff --git a/xlators/debug/delay-gen/src/delay-gen.c b/xlators/debug/delay-gen/src/delay-gen.c index 9dc82338bf..849ebeaabc 100644 --- a/xlators/debug/delay-gen/src/delay-gen.c +++ b/xlators/debug/delay-gen/src/delay-gen.c @@ -529,7 +529,7 @@ delay_gen_parse_fill_fops (dg_t *dg, char *enable_fops) char *saveptr = NULL; char *dup_enable_fops = NULL; - if (!enable_fops) { + if (strlen (enable_fops) == 0) { for (i = GF_FOP_NULL + 1; i < GF_FOP_MAXVALUE; i++) dg->enable[i] = 1; } else { @@ -720,16 +720,28 @@ struct volume_options options[] = { .type = GF_OPTION_TYPE_PERCENT, .default_value = "10%", .description = "Percentage delay of operations when enabled.", + .op_version = {GD_OP_VERSION_3_13_0}, + .flags = OPT_FLAG_SETTABLE, + .tags = {"delay-gen"}, }, { .key = {"delay-duration"}, .type = GF_OPTION_TYPE_INT, .description = "Delay duration in micro seconds", .default_value = "100000", + .op_version = {GD_OP_VERSION_3_13_0}, + .flags = OPT_FLAG_SETTABLE, + .tags = {"delay-gen"}, }, { .key = {"enable"}, .type = GF_OPTION_TYPE_STR, + .description = "Accepts a string which takes ',' separated fop " + "strings to denote which fops are enabled for delay", + .op_version = {GD_OP_VERSION_3_13_0}, + .flags = OPT_FLAG_SETTABLE, + .tags = {"delay-gen"}, + .default_value = "", }, { .key = {NULL} } diff --git a/xlators/debug/error-gen/src/error-gen.c b/xlators/debug/error-gen/src/error-gen.c index 0ce88a9291..00008968f6 100644 --- a/xlators/debug/error-gen/src/error-gen.c +++ b/xlators/debug/error-gen/src/error-gen.c @@ -1695,6 +1695,8 @@ struct volume_options options[] = { { .key = {"enable"}, .type = GF_OPTION_TYPE_STR, + .description = "Accepts a string which takes ',' separated fop " + "strings to denote which fops are enabled for error", }, { .key = {NULL} } |