f338ef
From 84d8a0ca5b521b9d87679ffebe420fe69869961d Mon Sep 17 00:00:00 2001
f338ef
From: Kinglong Mee <kinglongmee@gmail.com>
f338ef
Date: Mon, 8 Jul 2019 21:13:28 +0800
f338ef
Subject: [PATCH 270/276] cluster/ec: inherit healing from lock when it has
f338ef
 info
f338ef
f338ef
If lock has info, fop should inherit healing mask from it.
f338ef
Otherwise, fop cannot inherit right healing when changed_flags is zero.
f338ef
f338ef
Upstream-patch: https://review.gluster.org/c/glusterfs/+/23010
f338ef
Change-Id: Ife80c9169d2c555024347a20300b0583f7e8a87f
f338ef
fixes: bz#1732792
f338ef
Signed-off-by: Kinglong Mee <mijinlong@horiscale.com>
f338ef
Reviewed-on: https://code.engineering.redhat.com/gerrit/177974
f338ef
Tested-by: RHGS Build Bot <nigelb@redhat.com>
f338ef
Reviewed-by: Sunil Kumar Heggodu Gopala Acharya <sheggodu@redhat.com>
f338ef
---
f338ef
 xlators/cluster/ec/src/ec-common.c | 5 +++--
f338ef
 1 file changed, 3 insertions(+), 2 deletions(-)
f338ef
f338ef
diff --git a/xlators/cluster/ec/src/ec-common.c b/xlators/cluster/ec/src/ec-common.c
f338ef
index e2e582f..db1ff5b 100644
f338ef
--- a/xlators/cluster/ec/src/ec-common.c
f338ef
+++ b/xlators/cluster/ec/src/ec-common.c
f338ef
@@ -1412,11 +1412,12 @@ ec_get_size_version(ec_lock_link_t *link)
f338ef
     set_dirty = ec_set_dirty_flag(link, ctx, dirty);
f338ef
 
f338ef
     /* If ec metadata has already been retrieved, do not try again. */
f338ef
-    if (ctx->have_info && (!set_dirty)) {
f338ef
+    if (ctx->have_info) {
f338ef
         if (ec_is_data_fop(fop->id)) {
f338ef
             fop->healing |= lock->healing;
f338ef
         }
f338ef
-        goto unlock;
f338ef
+        if (!set_dirty)
f338ef
+            goto unlock;
f338ef
     }
f338ef
 
f338ef
     /* Determine if there's something we need to retrieve for the current
f338ef
-- 
f338ef
1.8.3.1
f338ef