From f81deb95db417eeededf7442a30304a880cc8169 Mon Sep 17 00:00:00 2001 From: Gaurav Kumar Garg Date: Thu, 23 Apr 2015 18:44:30 +0530 Subject: features/bitrot: Per volume bitrot translator Currently whatever bitrot/scrubber tunable value user set for one volume that value is considering for all other volumes also. Each volume should act on their respective bitrot/scrubber tunable value. For handling bitrot/scrubber tunable value independently with respect to all the volume bitrot and scrubber translator should run seperatly for each volume. Change-Id: I1d9379508afe6cfd2f78e3ebf29c829c362d84a9 BUG: 1170075 Signed-off-by: Gaurav Kumar Garg Reviewed-on: http://review.gluster.org/10352 Reviewed-by: Venky Shankar Tested-by: Venky Shankar Reviewed-by: Atin Mukherjee Reviewed-by: Kaushal M --- xlators/mgmt/glusterd/src/glusterd-bitrot.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'xlators/mgmt/glusterd/src/glusterd-bitrot.c') diff --git a/xlators/mgmt/glusterd/src/glusterd-bitrot.c b/xlators/mgmt/glusterd/src/glusterd-bitrot.c index ae654a0aa87..5474f30626a 100644 --- a/xlators/mgmt/glusterd/src/glusterd-bitrot.c +++ b/xlators/mgmt/glusterd/src/glusterd-bitrot.c @@ -25,6 +25,7 @@ #include "syscall.h" #include "byte-order.h" #include "compat-errno.h" +#include "glusterd-scrub-svc.h" #include #include @@ -154,6 +155,13 @@ glusterd_bitrot_scrub_throttle (glusterd_volinfo_t *volinfo, dict_t *dict, goto out; } + ret = glusterd_scrubsvc_reconfigure (); + if (ret) { + gf_log (this->name, GF_LOG_ERROR, "Failed to reconfigure scrub " + "services"); + goto out; + } + out: return ret; } @@ -185,6 +193,13 @@ glusterd_bitrot_scrub_freq (glusterd_volinfo_t *volinfo, dict_t *dict, goto out; } + ret = glusterd_scrubsvc_reconfigure (); + if (ret) { + gf_log (this->name, GF_LOG_ERROR, "Failed to reconfigure scrub " + "services"); + goto out; + } + out: return ret; } @@ -221,6 +236,13 @@ glusterd_bitrot_scrub (glusterd_volinfo_t *volinfo, dict_t *dict, goto out; } + ret = glusterd_scrubsvc_reconfigure (); + if (ret) { + gf_log (this->name, GF_LOG_ERROR, "Failed to reconfigure scrub " + "services"); + goto out; + } + out: return ret; } -- cgit