summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src/glusterd-op-sm.c
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-05 05:03:48 -0700
commite2fc345edcf393969c4ff2c6a5b0bead2bf51d5d (patch)
tree1151d9536e1e8d8a130a0d86971b7b39d15d6494 /xlators/mgmt/glusterd/src/glusterd-op-sm.c
parentae87a7fedfcf7f6b287ef5c3860f45412363e4f6 (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: 1228045 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> (cherry picked from commit 79d8916929f7d5b85a09ae9b75eadf945a3e11fb) Reviewed-on: http://review.gluster.org/11079 Tested-by: Gluster Build System <jenkins@build.gluster.com>
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-op-sm.c')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-op-sm.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-op-sm.c b/xlators/mgmt/glusterd/src/glusterd-op-sm.c
index 9b9684e59a1..e304cb0bed7 100644
--- a/xlators/mgmt/glusterd/src/glusterd-op-sm.c
+++ b/xlators/mgmt/glusterd/src/glusterd-op-sm.c
@@ -1696,6 +1696,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;
}