From 2892fb43027b2c3c39b9e3b32ea99a3a090c0297 Mon Sep 17 00:00:00 2001 From: Ravishankar N Date: Fri, 23 Dec 2016 07:11:13 +0000 Subject: afr: use accused matrix instead of readable matrix for deciding heals Problem: afr_replies_interpret() used the 'readable' matrix to trigger client side heals after inode refresh. But for arbiter, readable is always zero. So when `dd` is run with a data brick down, spurious data heals are are triggered. These heals open an fd, causing eager lock to be disabled (open fd count >1) in afr transactions, leading to extra FXATTROPS Fix: Use the accused matrix (derived from interpreting the afr pending xattrs) to decide whether we can start heal or not. > Reviewed-on: http://review.gluster.org/16277 > NetBSD-regression: NetBSD Build System > CentOS-regression: Gluster Build System > Smoke: Gluster Build System > Reviewed-by: Pranith Kumar Karampuri > Tested-by: Pranith Kumar Karampuri (cherry picked from commit 5a7c86e578f5bbd793126a035c30e6b052177a9f) Change-Id: Ibbd56c9aed6026de6ec42422e60293702aaf55f9 BUG: 1408820 Signed-off-by: Ravishankar N Reviewed-on: http://review.gluster.org/16299 Smoke: Gluster Build System NetBSD-regression: NetBSD Build System CentOS-regression: Gluster Build System Reviewed-by: Pranith Kumar Karampuri --- xlators/cluster/afr/src/afr-common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xlators/cluster/afr/src/afr-common.c b/xlators/cluster/afr/src/afr-common.c index 923afc804be..8a97e00f935 100644 --- a/xlators/cluster/afr/src/afr-common.c +++ b/xlators/cluster/afr/src/afr-common.c @@ -934,7 +934,7 @@ afr_replies_interpret (call_frame_t *frame, xlator_t *this, inode_t *inode, for (i = 0; i < priv->child_count; i++) { if (start_heal && priv->child_up[i] && - (!data_readable[i] || !metadata_readable[i])) { + (data_accused[i] || metadata_accused[i])) { *start_heal = _gf_true; break; } -- cgit