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