diff --git a/0466-cluster-ec-Change-stale-index-handling.patch b/0466-cluster-ec-Change-stale-index-handling.patch new file mode 100644 index 0000000..1dc9f57 --- /dev/null +++ b/0466-cluster-ec-Change-stale-index-handling.patch @@ -0,0 +1,68 @@ +From b603170ae5f583037b8177a9d19e56c7821edf0b Mon Sep 17 00:00:00 2001 +From: Pranith Kumar K +Date: Tue, 25 Aug 2020 04:19:54 +0530 +Subject: [PATCH 466/466] cluster/ec: Change stale index handling + +Problem: +Earlier approach is setting dirty bit which requires extra heal + +Fix: +Send zero-xattrop which deletes stale index without any need +for extra heal. + + > Fixes: #1385 + > Upstream-patch: https://review.gluster.org/c/glusterfs/+/24911/ + +BUG: 1785714 +Change-Id: I7e97a1d8b5516f7be47cae55d0e56b14332b6cae +Signed-off-by: Pranith Kumar K +Reviewed-on: https://code.engineering.redhat.com/gerrit/209904 +Tested-by: RHGS Build Bot +Tested-by: Ashish Pandey +Reviewed-by: Sunil Kumar Heggodu Gopala Acharya +--- + xlators/cluster/ec/src/ec-heal.c | 14 +++++--------- + 1 file changed, 5 insertions(+), 9 deletions(-) + +diff --git a/xlators/cluster/ec/src/ec-heal.c b/xlators/cluster/ec/src/ec-heal.c +index 6e6948b..06bafa5 100644 +--- a/xlators/cluster/ec/src/ec-heal.c ++++ b/xlators/cluster/ec/src/ec-heal.c +@@ -2490,7 +2490,7 @@ out: + } + + int +-ec_heal_set_dirty_without_lock(call_frame_t *frame, ec_t *ec, inode_t *inode) ++ec_heal_purge_stale_index(call_frame_t *frame, ec_t *ec, inode_t *inode) + { + int i = 0; + int ret = 0; +@@ -2520,7 +2520,6 @@ ec_heal_set_dirty_without_lock(call_frame_t *frame, ec_t *ec, inode_t *inode) + xattr[i] = dict; + on[i] = 1; + } +- dirty_xattr[EC_METADATA_TXN] = hton64(1); + ret = dict_set_static_bin(dict, EC_XATTR_DIRTY, dirty_xattr, + (sizeof(*dirty_xattr) * EC_VERSION_SIZE)); + if (ret < 0) { +@@ -2621,13 +2620,10 @@ ec_heal_do(xlator_t *this, void *data, loc_t *loc, int32_t partial) + gf_msg(ec->xl->name, GF_LOG_INFO, 0, EC_MSG_HEAL_FAIL, + "Index entry needs to be purged for: %s ", + uuid_utoa(loc->gfid)); +- /* We need to send xattrop to set dirty flag so that it can be +- * healed and index entry could be removed. We need not to take lock +- * on this entry to do so as we are just setting dirty flag which +- * actually increases the trusted.ec.dirty count and does not set +- * the new value. +- * This will make sure that it is not interfering in other fops.*/ +- ec_heal_set_dirty_without_lock(frame, ec, loc->inode); ++ /* We need to send zero-xattrop so that stale index entry could be ++ * removed. We need not take lock on this entry to do so as ++ * xattrop on a brick is atomic. */ ++ ec_heal_purge_stale_index(frame, ec, loc->inode); + } else if (need_heal == EC_HEAL_NONEED) { + gf_msg(ec->xl->name, GF_LOG_DEBUG, 0, EC_MSG_HEAL_FAIL, + "Heal is not required for : %s ", uuid_utoa(loc->gfid)); +-- +1.8.3.1 + diff --git a/glusterfs.spec b/glusterfs.spec index 08258f6..22a42b5 100644 --- a/glusterfs.spec +++ b/glusterfs.spec @@ -237,7 +237,7 @@ Release: 0.1%{?prereltag:.%{prereltag}}%{?dist} %else Name: glusterfs Version: 6.0 -Release: 41%{?dist} +Release: 42%{?dist} ExcludeArch: i686 %endif License: GPLv2 or LGPLv3+ @@ -780,6 +780,7 @@ Patch0462: 0462-Issue-with-gf_fill_iatt_for_dirent.patch Patch0463: 0463-cluster-ec-Change-handling-of-heal-failure-to-avoid-.patch Patch0464: 0464-storage-posix-Remove-nr_files-usage.patch Patch0465: 0465-posix-Implement-a-janitor-thread-to-close-fd.patch +Patch0466: 0466-cluster-ec-Change-stale-index-handling.patch %description GlusterFS is a distributed file-system capable of scaling to several @@ -2520,6 +2521,9 @@ fi %endif %changelog +* Wed Sep 02 2020 Deepshikha Khandelwal - 6.0-42 +- fixes bugs bz#1785714 + * Tue Aug 25 2020 Deepshikha Khandelwal - 6.0-41 - fixes bugs bz#1785714 bz#1851424 bz#1851989 bz#1852736 bz#1853189 bz#1855966