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