From 572b5cdd0f3db251a08c794265fa32b421ea46c5 Mon Sep 17 00:00:00 2001 From: Ravishankar N Date: Fri, 23 Dec 2016 07:11:13 +0000 Subject: [PATCH 258/267] afr: use accused matrix instead of readable matrix for deciding heals Backport of: http://review.gluster.org/16277 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. Change-Id: Ic160484252c6784c5794614e5c9790da5905c80c BUG: 1408112 Signed-off-by: Ravishankar N Reviewed-on: https://code.engineering.redhat.com/gerrit/93735 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 2e93ba9..6f1ceb1 100644 --- a/xlators/cluster/afr/src/afr-common.c +++ b/xlators/cluster/afr/src/afr-common.c @@ -995,7 +995,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; } -- 2.9.3