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