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