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