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