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