From f73b4476b15f9d6d3dc3c8e20c9742aacd857f9f Mon Sep 17 00:00:00 2001 From: Ashish Pandey Date: Thu, 18 Oct 2018 17:15:58 +0530 Subject: cluster/afr : Check for UP bricks before starting heal Problem: Currently for replica volume, even if only one brick is UP SHD will keep crawling index entries even if it can not heal anything. In thin-arbiter volume which is also a replica 2 volume, this causes inode lock contention which in turn sends upcall to all the clients to release notify locks, even if it can not do anything for healing. This will slow down the client performance and kills the purpose of keeping in memory information about bad brick. Solution: Before starting heal or even crawling, check if sufficient number of children are UP and available to check and heal entries. Change-Id: I011c9da3b37cae275f791affd56b8f1c1ac9255d updates: bz#1640581 Signed-off-by: Ashish Pandey --- xlators/cluster/afr/src/afr-common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'xlators/cluster/afr/src/afr-common.c') diff --git a/xlators/cluster/afr/src/afr-common.c b/xlators/cluster/afr/src/afr-common.c index 8d50144c046..e655999c6a6 100644 --- a/xlators/cluster/afr/src/afr-common.c +++ b/xlators/cluster/afr/src/afr-common.c @@ -4919,7 +4919,7 @@ find_child_index(xlator_t *this, xlator_t *child) return i; } -static int +int __afr_get_up_children_count(afr_private_t *priv) { int up_children = 0; -- cgit