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