|
|
e3c68b |
From 21f376939f03f91214218c485e7d3a2848dae4b2 Mon Sep 17 00:00:00 2001
|
|
|
e3c68b |
From: Mohammed Rafi KC <rkavunga@redhat.com>
|
|
|
e3c68b |
Date: Thu, 11 Jul 2019 12:43:44 +0530
|
|
|
e3c68b |
Subject: [PATCH 231/255] Revert "graph/shd: Use top down approach while
|
|
|
e3c68b |
cleaning xlator"
|
|
|
e3c68b |
|
|
|
e3c68b |
This reverts commit b963fa8bb71963127147d33bf609f439dd5bd107.
|
|
|
e3c68b |
|
|
|
e3c68b |
Label : DOWNSTREAM ONLY
|
|
|
e3c68b |
|
|
|
e3c68b |
BUG: 1471742
|
|
|
e3c68b |
Change-Id: Ifb8056395c5988cf7c484891bea052f5415bf9da
|
|
|
e3c68b |
Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com>
|
|
|
e3c68b |
Reviewed-on: https://code.engineering.redhat.com/gerrit/175941
|
|
|
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 | 10 +---------
|
|
|
e3c68b |
xlators/features/bit-rot/src/stub/bit-rot-stub.c | 1 -
|
|
|
e3c68b |
xlators/features/changelog/src/changelog.c | 1 -
|
|
|
e3c68b |
xlators/features/cloudsync/src/cloudsync.c | 4 +---
|
|
|
e3c68b |
xlators/features/index/src/index.c | 1 -
|
|
|
e3c68b |
xlators/features/quiesce/src/quiesce.c | 1 -
|
|
|
e3c68b |
xlators/features/read-only/src/worm.c | 1 -
|
|
|
e3c68b |
xlators/features/sdfs/src/sdfs.c | 1 -
|
|
|
e3c68b |
xlators/features/selinux/src/selinux.c | 2 --
|
|
|
e3c68b |
xlators/features/trash/src/trash.c | 1 -
|
|
|
e3c68b |
10 files changed, 2 insertions(+), 21 deletions(-)
|
|
|
e3c68b |
|
|
|
e3c68b |
diff --git a/libglusterfs/src/graph.c b/libglusterfs/src/graph.c
|
|
|
e3c68b |
index 172dc61..5b95fd6 100644
|
|
|
e3c68b |
--- a/libglusterfs/src/graph.c
|
|
|
e3c68b |
+++ b/libglusterfs/src/graph.c
|
|
|
e3c68b |
@@ -1193,14 +1193,6 @@ glusterfs_graph_fini(glusterfs_graph_t *graph)
|
|
|
e3c68b |
if (trav->init_succeeded) {
|
|
|
e3c68b |
trav->cleanup_starting = 1;
|
|
|
e3c68b |
trav->fini(trav);
|
|
|
e3c68b |
- if (trav->local_pool) {
|
|
|
e3c68b |
- mem_pool_destroy(trav->local_pool);
|
|
|
e3c68b |
- trav->local_pool = NULL;
|
|
|
e3c68b |
- }
|
|
|
e3c68b |
- if (trav->itable) {
|
|
|
e3c68b |
- inode_table_destroy(trav->itable);
|
|
|
e3c68b |
- trav->itable = NULL;
|
|
|
e3c68b |
- }
|
|
|
e3c68b |
trav->init_succeeded = 0;
|
|
|
e3c68b |
}
|
|
|
e3c68b |
trav = trav->next;
|
|
|
e3c68b |
@@ -1402,7 +1394,7 @@ glusterfs_graph_cleanup(void *arg)
|
|
|
e3c68b |
|
|
|
e3c68b |
pthread_mutex_lock(&ctx->cleanup_lock);
|
|
|
e3c68b |
{
|
|
|
e3c68b |
- glusterfs_graph_fini(graph);
|
|
|
e3c68b |
+ glusterfs_graph_deactivate(graph);
|
|
|
e3c68b |
glusterfs_graph_destroy(graph);
|
|
|
e3c68b |
}
|
|
|
e3c68b |
pthread_mutex_unlock(&ctx->cleanup_lock);
|
|
|
e3c68b |
diff --git a/xlators/features/bit-rot/src/stub/bit-rot-stub.c b/xlators/features/bit-rot/src/stub/bit-rot-stub.c
|
|
|
e3c68b |
index 03446be..3f48a4b 100644
|
|
|
e3c68b |
--- a/xlators/features/bit-rot/src/stub/bit-rot-stub.c
|
|
|
e3c68b |
+++ b/xlators/features/bit-rot/src/stub/bit-rot-stub.c
|
|
|
e3c68b |
@@ -185,7 +185,6 @@ cleanup_lock:
|
|
|
e3c68b |
pthread_mutex_destroy(&priv->lock);
|
|
|
e3c68b |
free_mempool:
|
|
|
e3c68b |
mem_pool_destroy(priv->local_pool);
|
|
|
e3c68b |
- priv->local_pool = NULL;
|
|
|
e3c68b |
free_priv:
|
|
|
e3c68b |
GF_FREE(priv);
|
|
|
e3c68b |
this->private = NULL;
|
|
|
e3c68b |
diff --git a/xlators/features/changelog/src/changelog.c b/xlators/features/changelog/src/changelog.c
|
|
|
e3c68b |
index 2862d1e..d9025f3 100644
|
|
|
e3c68b |
--- a/xlators/features/changelog/src/changelog.c
|
|
|
e3c68b |
+++ b/xlators/features/changelog/src/changelog.c
|
|
|
e3c68b |
@@ -2790,7 +2790,6 @@ cleanup_options:
|
|
|
e3c68b |
changelog_freeup_options(this, priv);
|
|
|
e3c68b |
cleanup_mempool:
|
|
|
e3c68b |
mem_pool_destroy(this->local_pool);
|
|
|
e3c68b |
- this->local_pool = NULL;
|
|
|
e3c68b |
cleanup_priv:
|
|
|
e3c68b |
GF_FREE(priv);
|
|
|
e3c68b |
error_return:
|
|
|
e3c68b |
diff --git a/xlators/features/cloudsync/src/cloudsync.c b/xlators/features/cloudsync/src/cloudsync.c
|
|
|
e3c68b |
index 0ad987e..26e512c 100644
|
|
|
e3c68b |
--- a/xlators/features/cloudsync/src/cloudsync.c
|
|
|
e3c68b |
+++ b/xlators/features/cloudsync/src/cloudsync.c
|
|
|
e3c68b |
@@ -200,10 +200,8 @@ cs_init(xlator_t *this)
|
|
|
e3c68b |
|
|
|
e3c68b |
out:
|
|
|
e3c68b |
if (ret == -1) {
|
|
|
e3c68b |
- if (this->local_pool) {
|
|
|
e3c68b |
+ if (this->local_pool)
|
|
|
e3c68b |
mem_pool_destroy(this->local_pool);
|
|
|
e3c68b |
- this->local_pool = NULL;
|
|
|
e3c68b |
- }
|
|
|
e3c68b |
|
|
|
e3c68b |
cs_cleanup_private(priv);
|
|
|
e3c68b |
|
|
|
e3c68b |
diff --git a/xlators/features/index/src/index.c b/xlators/features/index/src/index.c
|
|
|
e3c68b |
index 4ece7ff..2f2a6d0 100644
|
|
|
e3c68b |
--- a/xlators/features/index/src/index.c
|
|
|
e3c68b |
+++ b/xlators/features/index/src/index.c
|
|
|
e3c68b |
@@ -2478,7 +2478,6 @@ out:
|
|
|
e3c68b |
GF_FREE(priv);
|
|
|
e3c68b |
this->private = NULL;
|
|
|
e3c68b |
mem_pool_destroy(this->local_pool);
|
|
|
e3c68b |
- this->local_pool = NULL;
|
|
|
e3c68b |
}
|
|
|
e3c68b |
|
|
|
e3c68b |
if (attr_inited)
|
|
|
e3c68b |
diff --git a/xlators/features/quiesce/src/quiesce.c b/xlators/features/quiesce/src/quiesce.c
|
|
|
e3c68b |
index 06f58c9..bfd1116 100644
|
|
|
e3c68b |
--- a/xlators/features/quiesce/src/quiesce.c
|
|
|
e3c68b |
+++ b/xlators/features/quiesce/src/quiesce.c
|
|
|
e3c68b |
@@ -2536,7 +2536,6 @@ fini(xlator_t *this)
|
|
|
e3c68b |
this->private = NULL;
|
|
|
e3c68b |
|
|
|
e3c68b |
mem_pool_destroy(priv->local_pool);
|
|
|
e3c68b |
- priv->local_pool = NULL;
|
|
|
e3c68b |
LOCK_DESTROY(&priv->lock);
|
|
|
e3c68b |
GF_FREE(priv);
|
|
|
e3c68b |
out:
|
|
|
e3c68b |
diff --git a/xlators/features/read-only/src/worm.c b/xlators/features/read-only/src/worm.c
|
|
|
e3c68b |
index 7d13180..24196f8 100644
|
|
|
e3c68b |
--- a/xlators/features/read-only/src/worm.c
|
|
|
e3c68b |
+++ b/xlators/features/read-only/src/worm.c
|
|
|
e3c68b |
@@ -569,7 +569,6 @@ fini(xlator_t *this)
|
|
|
e3c68b |
mem_put(priv);
|
|
|
e3c68b |
this->private = NULL;
|
|
|
e3c68b |
mem_pool_destroy(this->local_pool);
|
|
|
e3c68b |
- this->local_pool = NULL;
|
|
|
e3c68b |
out:
|
|
|
e3c68b |
return;
|
|
|
e3c68b |
}
|
|
|
e3c68b |
diff --git a/xlators/features/sdfs/src/sdfs.c b/xlators/features/sdfs/src/sdfs.c
|
|
|
e3c68b |
index 164c632..f0247fd 100644
|
|
|
e3c68b |
--- a/xlators/features/sdfs/src/sdfs.c
|
|
|
e3c68b |
+++ b/xlators/features/sdfs/src/sdfs.c
|
|
|
e3c68b |
@@ -1429,7 +1429,6 @@ void
|
|
|
e3c68b |
fini(xlator_t *this)
|
|
|
e3c68b |
{
|
|
|
e3c68b |
mem_pool_destroy(this->local_pool);
|
|
|
e3c68b |
- this->local_pool = NULL;
|
|
|
e3c68b |
return;
|
|
|
e3c68b |
}
|
|
|
e3c68b |
|
|
|
e3c68b |
diff --git a/xlators/features/selinux/src/selinux.c b/xlators/features/selinux/src/selinux.c
|
|
|
e3c68b |
index ce5fc90..58b4c5d 100644
|
|
|
e3c68b |
--- a/xlators/features/selinux/src/selinux.c
|
|
|
e3c68b |
+++ b/xlators/features/selinux/src/selinux.c
|
|
|
e3c68b |
@@ -256,7 +256,6 @@ out:
|
|
|
e3c68b |
GF_FREE(priv);
|
|
|
e3c68b |
}
|
|
|
e3c68b |
mem_pool_destroy(this->local_pool);
|
|
|
e3c68b |
- this->local_pool = NULL;
|
|
|
e3c68b |
}
|
|
|
e3c68b |
return ret;
|
|
|
e3c68b |
}
|
|
|
e3c68b |
@@ -285,7 +284,6 @@ fini(xlator_t *this)
|
|
|
e3c68b |
GF_FREE(priv);
|
|
|
e3c68b |
|
|
|
e3c68b |
mem_pool_destroy(this->local_pool);
|
|
|
e3c68b |
- this->local_pool = NULL;
|
|
|
e3c68b |
|
|
|
e3c68b |
return;
|
|
|
e3c68b |
}
|
|
|
e3c68b |
diff --git a/xlators/features/trash/src/trash.c b/xlators/features/trash/src/trash.c
|
|
|
e3c68b |
index eb5007b..d668436 100644
|
|
|
e3c68b |
--- a/xlators/features/trash/src/trash.c
|
|
|
e3c68b |
+++ b/xlators/features/trash/src/trash.c
|
|
|
e3c68b |
@@ -2523,7 +2523,6 @@ out:
|
|
|
e3c68b |
GF_FREE(priv);
|
|
|
e3c68b |
}
|
|
|
e3c68b |
mem_pool_destroy(this->local_pool);
|
|
|
e3c68b |
- this->local_pool = NULL;
|
|
|
e3c68b |
}
|
|
|
e3c68b |
return ret;
|
|
|
e3c68b |
}
|
|
|
e3c68b |
--
|
|
|
e3c68b |
1.8.3.1
|
|
|
e3c68b |
|