f338ef
From ad40c0783e84e5e54a83aeb20a52f720cc881b0c Mon Sep 17 00:00:00 2001
f338ef
From: Mohammed Rafi KC <rkavunga@redhat.com>
f338ef
Date: Thu, 11 Jul 2019 12:46:22 +0530
f338ef
Subject: [PATCH 239/255] Revert "ec/fini: Fix race with ec_fini and ec_notify"
f338ef
f338ef
This reverts commit 998d9b8b5e271f407e1c654c34f45f0db36abc71.
f338ef
f338ef
BUG: 1471742
f338ef
Change-Id: Ifccb8a22d9ef96c22b32dcb4b82bf4d21cf85484
f338ef
Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com>
f338ef
Reviewed-on: https://code.engineering.redhat.com/gerrit/175948
f338ef
Tested-by: RHGS Build Bot <nigelb@redhat.com>
f338ef
Reviewed-by: Sunil Kumar Heggodu Gopala Acharya <sheggodu@redhat.com>
f338ef
---
f338ef
 libglusterfs/src/glusterfs/xlator.h |  3 ---
f338ef
 libglusterfs/src/libglusterfs.sym   |  1 -
f338ef
 libglusterfs/src/xlator.c           | 21 ---------------------
f338ef
 xlators/cluster/ec/src/ec-heal.c    |  4 ----
f338ef
 xlators/cluster/ec/src/ec-heald.c   |  6 ------
f338ef
 xlators/cluster/ec/src/ec.c         |  3 ---
f338ef
 6 files changed, 38 deletions(-)
f338ef
f338ef
diff --git a/libglusterfs/src/glusterfs/xlator.h b/libglusterfs/src/glusterfs/xlator.h
f338ef
index 09e463e..8998976 100644
f338ef
--- a/libglusterfs/src/glusterfs/xlator.h
f338ef
+++ b/libglusterfs/src/glusterfs/xlator.h
f338ef
@@ -1092,7 +1092,4 @@ gluster_graph_take_reference(xlator_t *tree);
f338ef
 
f338ef
 gf_boolean_t
f338ef
 mgmt_is_multiplexed_daemon(char *name);
f338ef
-
f338ef
-gf_boolean_t
f338ef
-xlator_is_cleanup_starting(xlator_t *this);
f338ef
 #endif /* _XLATOR_H */
f338ef
diff --git a/libglusterfs/src/libglusterfs.sym b/libglusterfs/src/libglusterfs.sym
f338ef
index 86215d2..05f93b4 100644
f338ef
--- a/libglusterfs/src/libglusterfs.sym
f338ef
+++ b/libglusterfs/src/libglusterfs.sym
f338ef
@@ -1160,4 +1160,3 @@ glusterfs_process_svc_attach_volfp
f338ef
 glusterfs_mux_volfile_reconfigure
f338ef
 glusterfs_process_svc_detach
f338ef
 mgmt_is_multiplexed_daemon
f338ef
-xlator_is_cleanup_starting
f338ef
diff --git a/libglusterfs/src/xlator.c b/libglusterfs/src/xlator.c
f338ef
index fbfbbe2..022c3ed 100644
f338ef
--- a/libglusterfs/src/xlator.c
f338ef
+++ b/libglusterfs/src/xlator.c
f338ef
@@ -1486,24 +1486,3 @@ mgmt_is_multiplexed_daemon(char *name)
f338ef
     }
f338ef
     return _gf_false;
f338ef
 }
f338ef
-
f338ef
-gf_boolean_t
f338ef
-xlator_is_cleanup_starting(xlator_t *this)
f338ef
-{
f338ef
-    gf_boolean_t cleanup = _gf_false;
f338ef
-    glusterfs_graph_t *graph = NULL;
f338ef
-    xlator_t *xl = NULL;
f338ef
-
f338ef
-    if (!this)
f338ef
-        goto out;
f338ef
-    graph = this->graph;
f338ef
-
f338ef
-    if (!graph)
f338ef
-        goto out;
f338ef
-
f338ef
-    xl = graph->first;
f338ef
-    if (xl && xl->cleanup_starting)
f338ef
-        cleanup = _gf_true;
f338ef
-out:
f338ef
-    return cleanup;
f338ef
-}
f338ef
diff --git a/xlators/cluster/ec/src/ec-heal.c b/xlators/cluster/ec/src/ec-heal.c
f338ef
index 8844c29..2fa1f11 100644
f338ef
--- a/xlators/cluster/ec/src/ec-heal.c
f338ef
+++ b/xlators/cluster/ec/src/ec-heal.c
f338ef
@@ -2855,10 +2855,6 @@ ec_replace_brick_heal_wrap(void *opaque)
f338ef
         itable = ec->xl->itable;
f338ef
     else
f338ef
         goto out;
f338ef
-
f338ef
-    if (xlator_is_cleanup_starting(ec->xl))
f338ef
-        goto out;
f338ef
-
f338ef
     ret = ec_replace_heal(ec, itable->root);
f338ef
 out:
f338ef
     return ret;
f338ef
diff --git a/xlators/cluster/ec/src/ec-heald.c b/xlators/cluster/ec/src/ec-heald.c
f338ef
index 91512d7..edf5e11 100644
f338ef
--- a/xlators/cluster/ec/src/ec-heald.c
f338ef
+++ b/xlators/cluster/ec/src/ec-heald.c
f338ef
@@ -444,9 +444,6 @@ unlock:
f338ef
 int
f338ef
 ec_shd_full_healer_spawn(xlator_t *this, int subvol)
f338ef
 {
f338ef
-    if (xlator_is_cleanup_starting(this))
f338ef
-        return -1;
f338ef
-
f338ef
     return ec_shd_healer_spawn(this, NTH_FULL_HEALER(this, subvol),
f338ef
                                ec_shd_full_healer);
f338ef
 }
f338ef
@@ -454,9 +451,6 @@ ec_shd_full_healer_spawn(xlator_t *this, int subvol)
f338ef
 int
f338ef
 ec_shd_index_healer_spawn(xlator_t *this, int subvol)
f338ef
 {
f338ef
-    if (xlator_is_cleanup_starting(this))
f338ef
-        return -1;
f338ef
-
f338ef
     return ec_shd_healer_spawn(this, NTH_INDEX_HEALER(this, subvol),
f338ef
                                ec_shd_index_healer);
f338ef
 }
f338ef
diff --git a/xlators/cluster/ec/src/ec.c b/xlators/cluster/ec/src/ec.c
f338ef
index df5912c..264582a 100644
f338ef
--- a/xlators/cluster/ec/src/ec.c
f338ef
+++ b/xlators/cluster/ec/src/ec.c
f338ef
@@ -486,9 +486,6 @@ ec_set_up_state(ec_t *ec, uintptr_t index_mask, uintptr_t new_state)
f338ef
 {
f338ef
     uintptr_t current_state = 0;
f338ef
 
f338ef
-    if (xlator_is_cleanup_starting(ec->xl))
f338ef
-        return _gf_false;
f338ef
-
f338ef
     if ((ec->xl_notify & index_mask) == 0) {
f338ef
         ec->xl_notify |= index_mask;
f338ef
         ec->xl_notify_count++;
f338ef
-- 
f338ef
1.8.3.1
f338ef