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