summaryrefslogtreecommitdiffstats
path: root/xlators/debug
diff options
context:
space:
mode:
authorPranith Kumar K <pkarampu@redhat.com>2018-01-02 20:53:27 +0530
committerPranith Kumar K <pkarampu@redhat.com>2018-01-03 15:07:11 +0530
commit2632738aea79e61fda0381d3ac1c0a4a4560d32d (patch)
tree4d7c40fba6e109fac7bfd5dfd291147e731e00ae /xlators/debug
parent2170e661d005948c3ae568cd8035513dc9187e40 (diff)
debug/delay-gen: volume option fixes for GD2
Updates #302 Change-Id: I2c7ab85364337d0bc00428e0001ddc4038e08174 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
Diffstat (limited to 'xlators/debug')
-rw-r--r--xlators/debug/delay-gen/src/delay-gen.c14
-rw-r--r--xlators/debug/error-gen/src/error-gen.c2
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 9dc82338bfc..849ebeaabcd 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 0ce88a92918..00008968f6e 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} }