From 3586581c6edf222daf836c99ce2a1a266dc741f8 Mon Sep 17 00:00:00 2001 From: Gaurav Kumar Garg Date: Fri, 8 May 2015 13:08:22 +0530 Subject: 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 Reviewed-on: http://review.gluster.org/10664 Tested-by: NetBSD Build System Tested-by: Gluster Build System Reviewed-by: Atin Mukherjee Reviewed-by: Krishnan Parthasarathi Tested-by: Krishnan Parthasarathi --- xlators/mgmt/glusterd/src/glusterd-bitrot.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (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 456e5e788ab..08976cf6fb3 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; } } -- cgit