From 2fd342a0c21d761d73bfee782717accbce819f24 Mon Sep 17 00:00:00 2001 From: Pranith Kumar K Date: Mon, 5 Nov 2012 21:42:22 +0530 Subject: cluster/afr: Provide option to disable readdir failover In a replica pair unlike files, directories may not have their content in same order, so readdir for same (offset, size) may not give same entries on both the sobvolumes of replica pair. Switching over from one subvolume to another may not be a good idea sometimes. It may lead to duplicate entries or fewer entries or both. This patch provides a way to disable readdir-failover so that applications like rebalance can retry if they want to. Change-Id: I2b23eb224a2e84016a561362932613ac824c11a0 BUG: 859387 Signed-off-by: Pranith Kumar K Reviewed-on: http://review.gluster.org/4159 Tested-by: Gluster Build System Reviewed-by: Vijay Bellur --- xlators/cluster/afr/src/afr.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'xlators/cluster/afr/src/afr.h') diff --git a/xlators/cluster/afr/src/afr.h b/xlators/cluster/afr/src/afr.h index 48dfbf37e..7de8d8243 100644 --- a/xlators/cluster/afr/src/afr.h +++ b/xlators/cluster/afr/src/afr.h @@ -160,6 +160,7 @@ typedef struct _afr_private { afr_self_heald_t shd; gf_boolean_t choose_local; gf_boolean_t did_discovery; + gf_boolean_t readdir_failover; uint64_t sh_readdir_size; } afr_private_t; @@ -710,6 +711,7 @@ typedef struct { pthread_mutex_t delay_lock; gf_timer_t *delay_timer; call_frame_t *delay_frame; + int call_child; } afr_fd_ctx_t; -- cgit