From d88be3bc29dbd1eaa393802f3c98e188fe5287c8 Mon Sep 17 00:00:00 2001 From: Ashish Pandey Date: Mon, 31 Jul 2017 12:45:21 +0530 Subject: cluster/ec: Improve heal info command to handle obvious cases Problem: 1 - If a brick is down and we see an index entry in .glusterfs/indices, we should show it in heal info output as it most certainly needs heal. 2 - The first problem is also not getting handled after ec_heal_inspect. Even if in ec_heal_inspect, lookup will mark need_heal as true, we don't handle it properly in ec_get_heal_info and continue with locked inspect which takes lot of time. Solution: 1 - In first case we need not to do any further invstigation. As soon as we see that a brick is down, we should say that this index entry needs heal for sure. 2 - In second case, if we have need_heal as _gf_true after ec_heal_inspect, we should show it as heal requires. Change-Id: Ibe7f9d7602cc0b382ba53bddaf75a2a2c3326aa6 BUG: 1476668 Signed-off-by: Ashish Pandey --- xlators/cluster/ec/src/ec-common.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'xlators/cluster/ec/src/ec-common.h') diff --git a/xlators/cluster/ec/src/ec-common.h b/xlators/cluster/ec/src/ec-common.h index 6fb981709c0..f5d62269acf 100644 --- a/xlators/cluster/ec/src/ec-common.h +++ b/xlators/cluster/ec/src/ec-common.h @@ -124,7 +124,7 @@ int32_t ec_heal_inspect (call_frame_t *frame, ec_t *ec, inode_t *inode, unsigned char *locked_on, gf_boolean_t self_locked, gf_boolean_t thorough, - gf_boolean_t *need_heal); + ec_heal_need_t *need_heal); int32_t ec_get_heal_info (xlator_t *this, loc_t *loc, dict_t **dict); -- cgit