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