summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src/glusterd-bitrot.c
diff options
context:
space:
mode:
authorGauravKumarGarg <ggarg@redhat.com>2015-03-31 16:41:08 +0530
committerVenky Shankar <vshankar@redhat.com>2015-04-10 10:12:13 +0000
commitaccd61fb64b96c4af47aa6cfa41adb0f2e47a60a (patch)
tree2e1044171a52df21f090ca11c806ad93a8aa3269 /xlators/mgmt/glusterd/src/glusterd-bitrot.c
parentd57642044b720663c6474d318106c19e84f2c8bf (diff)
glusterd: bitd daemon should not start on the node which dont have any brick
If user enable bitrot from node1 which have brick then glusterd starting bitd daemon on node1 as well as glusterd starting bitd deamon on another node2 which does not have any brick (node1 and node2 are part of cluster). With this fix glusterd will not start bitd daemon on the node which don't have brick. Change-Id: Ic1c68d204221d369d89d628487cdd5957964792e BUG: 1207029 Signed-off-by: Gaurav Kumar Garg <ggarg@redhat.com> Reviewed-on: http://review.gluster.org/10071 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Atin Mukherjee <amukherj@redhat.com> Reviewed-by: Venky Shankar <vshankar@redhat.com> Tested-by: Venky Shankar <vshankar@redhat.com>
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-bitrot.c')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-bitrot.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-bitrot.c b/xlators/mgmt/glusterd/src/glusterd-bitrot.c
index ffc43698f95..083a714f596 100644
--- a/xlators/mgmt/glusterd/src/glusterd-bitrot.c
+++ b/xlators/mgmt/glusterd/src/glusterd-bitrot.c
@@ -310,7 +310,7 @@ glusterd_all_volumes_with_bitrot_stopped ()
}
static int
-glusterd_manage_bitrot (int opcode)
+glusterd_manage_bitrot (int opcode, glusterd_volinfo_t *volinfo)
{
int ret = -1;
xlator_t *this = NULL;
@@ -326,7 +326,7 @@ glusterd_manage_bitrot (int opcode)
case GF_BITROT_OPTION_TYPE_ENABLE:
case GF_BITROT_OPTION_TYPE_DISABLE:
ret = priv->bitd_svc.manager (&(priv->bitd_svc),
- NULL, PROC_START_NO_WAIT);
+ volinfo, PROC_START_NO_WAIT);
if (ret)
break;
ret = priv->scrub_svc.manager (&(priv->scrub_svc), NULL,
@@ -416,7 +416,7 @@ glusterd_op_bitrot (dict_t *dict, char **op_errstr, dict_t *rsp_dict)
goto out;
}
- ret = glusterd_manage_bitrot (type);
+ ret = glusterd_manage_bitrot (type, volinfo);
if (ret)
goto out;