From c0d9bb7828fcecb3cba27ed8708c69c90a13e07d Mon Sep 17 00:00:00 2001 From: Pranith Kumar K Date: Wed, 2 Mar 2016 22:09:44 +0530 Subject: cluster/afr: Choose local child as source if possible It is better to choose local brick as source if possible to prevent over the wire read thus saving on bandwidth. Also changed code to not attempt data-heal if 'source' is selected as arbiter. >Change-Id: I9a328d0198422280b13a30ab99545370a301dfea >BUG: 1314150 >Signed-off-by: Pranith Kumar K >Reviewed-on: http://review.gluster.org/13585 >Smoke: Gluster Build System >NetBSD-regression: NetBSD Build System >Reviewed-by: Krutika Dhananjay >Tested-by: Krutika Dhananjay >CentOS-regression: Gluster Build System >Reviewed-by: Jeff Darcy >(cherry picked from commit 2807e3fc005630213ab7ad251fef13d61c07ac6b) Change-Id: I24ea66683f81e238a6c1850664a49fe554011a0a BUG: 1322521 Signed-off-by: Pranith Kumar K Reviewed-on: http://review.gluster.org/13860 Smoke: Gluster Build System NetBSD-regression: NetBSD Build System CentOS-regression: Gluster Build System Reviewed-by: Ravishankar N --- xlators/cluster/afr/src/afr-self-heal.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'xlators/cluster/afr/src/afr-self-heal.h') diff --git a/xlators/cluster/afr/src/afr-self-heal.h b/xlators/cluster/afr/src/afr-self-heal.h index b298fa130c3..b0f545f2816 100644 --- a/xlators/cluster/afr/src/afr-self-heal.h +++ b/xlators/cluster/afr/src/afr-self-heal.h @@ -266,4 +266,7 @@ afr_selfheal_lock_cbk (call_frame_t *frame, void *cookie, xlator_t *this, int afr_locked_fill (call_frame_t *frame, xlator_t *this, unsigned char *locked_on); +int +afr_choose_source_by_policy (afr_private_t *priv, unsigned char *sources, + afr_transaction_type type); #endif /* !_AFR_SELFHEAL_H */ -- cgit