From e06f4590616dfe7b93e8ac147ed812756df4f22d Mon Sep 17 00:00:00 2001 From: Krutika Dhananjay Date: Thu, 22 Sep 2016 16:48:54 +0530 Subject: cluster/afr: CLI for granular entry heal enablement/disablement Backport of: http://review.gluster.org/15747 When there are already existing non-granular indices created that are yet to be healed, if granular-entry-heal option is toggled from 'off' to 'on', AFR self-heal whenever it kicks in, will try to look for granular indices in 'entry-changes'. Because of the absence of name indices, granular entry healing logic will fail to heal these directories, and worse yet unset pending extended attributes with the assumption that are no entries that need heal. To get around this, a new CLI is introduced which will invoke glfsheal program to figure whether at the time an attempt is made to enable granular entry heal, there are pending heals on the volume OR there are one or more bricks that are down. If either of them is true, the command will be failed with the appropriate error. New CLI: gluster volume heal granular-entry-heal {enable,disable} Change-Id: I342e0390f847fcb015a50ef58aedfcbcb58f4ed3 BUG: 1398501 Signed-off-by: Krutika Dhananjay Reviewed-on: http://review.gluster.org/15942 NetBSD-regression: NetBSD Build System Smoke: Gluster Build System CentOS-regression: Gluster Build System Reviewed-by: Pranith Kumar Karampuri --- rpc/rpc-lib/src/protocol-common.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'rpc') diff --git a/rpc/rpc-lib/src/protocol-common.h b/rpc/rpc-lib/src/protocol-common.h index 915d358e707..8a178148a10 100644 --- a/rpc/rpc-lib/src/protocol-common.h +++ b/rpc/rpc-lib/src/protocol-common.h @@ -252,6 +252,8 @@ typedef enum { GF_SHD_OP_HEAL_ENABLE, GF_SHD_OP_HEAL_DISABLE, GF_SHD_OP_SBRAIN_HEAL_FROM_LATEST_MTIME, + GF_SHD_OP_GRANULAR_ENTRY_HEAL_ENABLE, + GF_SHD_OP_GRANULAR_ENTRY_HEAL_DISABLE, } gf_xl_afr_op_t ; struct gf_gsync_detailed_status_ { -- cgit