summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGaurav Kumar Garg <ggarg@redhat.com>2015-05-27 14:36:24 +0530
committerVenky Shankar <vshankar@redhat.com>2015-06-03 23:37:59 -0700
commit79d8916929f7d5b85a09ae9b75eadf945a3e11fb (patch)
tree040277acd9ee1ed9b9170878a161ffe3f03a06d4
parente1fb4e9ca7905243b57761ae1edb62a3fed76fc4 (diff)
bitrot/glusterd: scrub option should be disabled once bitrot option is reset
Scrubber options should be disabled from the dictionary if user reset bitrot option. Change-Id: Ic7e390cf88b9b749f0ada8bbd4632f4cc0c4aff9 BUG: 1220713 Signed-off-by: Gaurav Kumar Garg <ggarg@redhat.com> Reviewed-on: http://review.gluster.org/10936 Reviewed-by: Atin Mukherjee <amukherj@redhat.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Venky Shankar <vshankar@redhat.com>
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-op-sm.c7
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-volume-set.c1
2 files changed, 8 insertions, 0 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-op-sm.c b/xlators/mgmt/glusterd/src/glusterd-op-sm.c
index 38b5edba67b..d22b0c571db 100644
--- a/xlators/mgmt/glusterd/src/glusterd-op-sm.c
+++ b/xlators/mgmt/glusterd/src/glusterd-op-sm.c
@@ -1594,6 +1594,13 @@ _delete_reconfig_opt (dict_t *this, char *key, data_t *value, void *data)
gf_log ("", GF_LOG_DEBUG, "deleting dict with key=%s,value=%s",
key, value->data);
dict_del (this, key);
+ /**Delete scrubber (pause/resume) option from the dictionary if bitrot
+ * option is going to be reset
+ * */
+ if (!strncmp (key, VKEY_FEATURES_BITROT,
+ strlen (VKEY_FEATURES_BITROT))) {
+ dict_del (this, VKEY_FEATURES_SCRUB);
+ }
out:
return 0;
}
diff --git a/xlators/mgmt/glusterd/src/glusterd-volume-set.c b/xlators/mgmt/glusterd/src/glusterd-volume-set.c
index cdcb594258f..ec107b55bf7 100644
--- a/xlators/mgmt/glusterd/src/glusterd-volume-set.c
+++ b/xlators/mgmt/glusterd/src/glusterd-volume-set.c
@@ -1846,6 +1846,7 @@ struct volopt_map_entry glusterd_volopt_map[] = {
.voltype = "features/bitrot",
.option = "scrubber",
.op_version = GD_OP_VERSION_3_7_0,
+ .flags = OPT_FLAG_FORCE,
.type = NO_DOC,
},
/* Upcall translator options */