3604df
From 572b5cdd0f3db251a08c794265fa32b421ea46c5 Mon Sep 17 00:00:00 2001
3604df
From: Ravishankar N <ravishankar@redhat.com>
3604df
Date: Fri, 23 Dec 2016 07:11:13 +0000
3604df
Subject: [PATCH 258/267] afr: use accused matrix instead of readable matrix
3604df
 for deciding heals
3604df
3604df
Backport of: http://review.gluster.org/16277
3604df
3604df
Problem:
3604df
afr_replies_interpret() used the 'readable' matrix to trigger client
3604df
side heals after inode refresh. But for arbiter, readable is always
3604df
zero. So when `dd` is run with a data brick down, spurious data heals
3604df
are are triggered. These heals open an fd, causing eager lock to be
3604df
disabled (open fd count >1) in afr transactions, leading to extra FXATTROPS
3604df
3604df
Fix:
3604df
Use the accused matrix (derived from interpreting the afr pending
3604df
xattrs) to decide whether we can start heal or not.
3604df
3604df
Change-Id: Ic160484252c6784c5794614e5c9790da5905c80c
3604df
BUG: 1408112
3604df
Signed-off-by: Ravishankar N <ravishankar@redhat.com>
3604df
Reviewed-on: https://code.engineering.redhat.com/gerrit/93735
3604df
Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
3604df
---
3604df
 xlators/cluster/afr/src/afr-common.c | 2 +-
3604df
 1 file changed, 1 insertion(+), 1 deletion(-)
3604df
3604df
diff --git a/xlators/cluster/afr/src/afr-common.c b/xlators/cluster/afr/src/afr-common.c
3604df
index 2e93ba9..6f1ceb1 100644
3604df
--- a/xlators/cluster/afr/src/afr-common.c
3604df
+++ b/xlators/cluster/afr/src/afr-common.c
3604df
@@ -995,7 +995,7 @@ afr_replies_interpret (call_frame_t *frame, xlator_t *this, inode_t *inode,
3604df
 
3604df
 	for (i = 0; i < priv->child_count; i++) {
3604df
                 if (start_heal && priv->child_up[i] &&
3604df
-                    (!data_readable[i] || !metadata_readable[i])) {
3604df
+                    (data_accused[i] || metadata_accused[i])) {
3604df
                         *start_heal = _gf_true;
3604df
                         break;
3604df
                 }
3604df
-- 
3604df
2.9.3
3604df