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