f338ef
From 9b3adb28207681f49ea97fc2c473634ff0f73db6 Mon Sep 17 00:00:00 2001
f338ef
From: Mohammed Rafi KC <rkavunga@redhat.com>
f338ef
Date: Thu, 11 Jul 2019 12:46:35 +0530
f338ef
Subject: [PATCH 240/255] Revert "glusterd/shd: Optimize the glustershd manager
f338ef
 to send reconfigure"
f338ef
f338ef
This reverts commit 321080e55f0ae97115a9542ba5de8494e7610860.
f338ef
f338ef
BUG: 1471742
f338ef
Change-Id: I5fa84baa3c3e72ca8eb605c7f1fafb53c68859f9
f338ef
Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com>
f338ef
Reviewed-on: https://code.engineering.redhat.com/gerrit/175949
f338ef
Tested-by: RHGS Build Bot <nigelb@redhat.com>
f338ef
Reviewed-by: Sunil Kumar Heggodu Gopala Acharya <sheggodu@redhat.com>
f338ef
---
f338ef
 libglusterfs/src/graph.c                     | 1 +
f338ef
 xlators/mgmt/glusterd/src/glusterd-shd-svc.c | 9 ++++-----
f338ef
 2 files changed, 5 insertions(+), 5 deletions(-)
f338ef
f338ef
diff --git a/libglusterfs/src/graph.c b/libglusterfs/src/graph.c
f338ef
index 27d9335..18fb2d9 100644
f338ef
--- a/libglusterfs/src/graph.c
f338ef
+++ b/libglusterfs/src/graph.c
f338ef
@@ -1497,6 +1497,7 @@ glusterfs_process_svc_detach(glusterfs_ctx_t *ctx, gf_volfile_t *volfile_obj)
f338ef
         parent_graph->last_xl = glusterfs_get_last_xlator(parent_graph);
f338ef
         parent_graph->xl_count -= graph->xl_count;
f338ef
         parent_graph->leaf_count -= graph->leaf_count;
f338ef
+        default_notify(xl, GF_EVENT_PARENT_DOWN, xl);
f338ef
         parent_graph->id++;
f338ef
         ret = 0;
f338ef
     }
f338ef
diff --git a/xlators/mgmt/glusterd/src/glusterd-shd-svc.c b/xlators/mgmt/glusterd/src/glusterd-shd-svc.c
f338ef
index d81d760..981cc87 100644
f338ef
--- a/xlators/mgmt/glusterd/src/glusterd-shd-svc.c
f338ef
+++ b/xlators/mgmt/glusterd/src/glusterd-shd-svc.c
f338ef
@@ -311,11 +311,10 @@ glusterd_shdsvc_manager(glusterd_svc_t *svc, void *data, int flags)
f338ef
          */
f338ef
         ret = svc->stop(svc, SIGTERM);
f338ef
     } else if (volinfo) {
f338ef
-        if (volinfo->status != GLUSTERD_STATUS_STARTED) {
f338ef
-            ret = svc->stop(svc, SIGTERM);
f338ef
-            if (ret)
f338ef
-                goto out;
f338ef
-        }
f338ef
+        ret = svc->stop(svc, SIGTERM);
f338ef
+        if (ret)
f338ef
+            goto out;
f338ef
+
f338ef
         if (volinfo->status == GLUSTERD_STATUS_STARTED) {
f338ef
             ret = svc->start(svc, flags);
f338ef
             if (ret)
f338ef
-- 
f338ef
1.8.3.1
f338ef