summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src/glusterd-bitrot.c
diff options
context:
space:
mode:
authorGaurav Kumar Garg <ggarg@redhat.com>2015-05-08 13:08:22 +0530
committerKrishnan Parthasarathi <kparthas@redhat.com>2015-05-09 22:25:15 -0700
commit3586581c6edf222daf836c99ce2a1a266dc741f8 (patch)
treea5eb2fb8897537add630817b69e0dda84b701094 /xlators/mgmt/glusterd/src/glusterd-bitrot.c
parentdeb76ef2a97ea51c0cbe329a1fdb636071fda90f (diff)
bitrot: Volfile generation should not proceed if node doesn't have any brick.
glusterd crashes when bitrot is enabled on a distributed volume from a node which doesn't host a brick. While generating volfile glusterd should check number of brick on that node. If node doesn't have any brick then graph generation for bitrot and scrubber should not proceed further. Change-Id: I2158113e20e93738cde2a22fd73f0ae6b22aae9e BUG: 1219784 Signed-off-by: Gaurav Kumar Garg <ggarg@redhat.com> Reviewed-on: http://review.gluster.org/10664 Tested-by: NetBSD Build System Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Atin Mukherjee <amukherj@redhat.com> Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com> Tested-by: Krishnan Parthasarathi <kparthas@redhat.com>
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-bitrot.c')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-bitrot.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-bitrot.c b/xlators/mgmt/glusterd/src/glusterd-bitrot.c
index 456e5e7..08976cf 100644
--- a/xlators/mgmt/glusterd/src/glusterd-bitrot.c
+++ b/xlators/mgmt/glusterd/src/glusterd-bitrot.c
@@ -357,10 +357,13 @@ glusterd_should_i_stop_bitd ()
brickinfo))
continue;
stopped = _gf_false;
- break;
+ return stopped;
}
- break;
+ /* Before stoping bitrot/scrubber daemon check
+ * other volume also whether respective volume
+ * host a brick from this node or not.*/
+ continue;
}
}