|
|
233933 |
From 1864a4f382f3031915e8126440a1561035487e49 Mon Sep 17 00:00:00 2001
|
|
|
233933 |
From: Mohammed Rafi KC <rkavunga@redhat.com>
|
|
|
233933 |
Date: Thu, 11 Jul 2019 12:53:20 +0530
|
|
|
233933 |
Subject: [PATCH 249/255] Revert "client/fini: return fini after rpc cleanup"
|
|
|
233933 |
|
|
|
233933 |
This reverts commit d79cb2cdff6fe8d962c9ac095a7541ddf500302b.
|
|
|
233933 |
|
|
|
233933 |
BUG: 1471742
|
|
|
233933 |
Change-Id: I15e6544d47fb7b6002c3b44de3fe0b2a13c84f51
|
|
|
233933 |
Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com>
|
|
|
233933 |
Reviewed-on: https://code.engineering.redhat.com/gerrit/175958
|
|
|
233933 |
Tested-by: RHGS Build Bot <nigelb@redhat.com>
|
|
|
233933 |
Reviewed-by: Sunil Kumar Heggodu Gopala Acharya <sheggodu@redhat.com>
|
|
|
233933 |
---
|
|
|
233933 |
xlators/protocol/client/src/client.c | 25 +++++--------------------
|
|
|
233933 |
xlators/protocol/client/src/client.h | 6 ------
|
|
|
233933 |
2 files changed, 5 insertions(+), 26 deletions(-)
|
|
|
233933 |
|
|
|
233933 |
diff --git a/xlators/protocol/client/src/client.c b/xlators/protocol/client/src/client.c
|
|
|
233933 |
index 95e4be5..532ef35 100644
|
|
|
233933 |
--- a/xlators/protocol/client/src/client.c
|
|
|
233933 |
+++ b/xlators/protocol/client/src/client.c
|
|
|
233933 |
@@ -49,12 +49,11 @@ client_fini_complete(xlator_t *this)
|
|
|
233933 |
if (!conf->destroy)
|
|
|
233933 |
return 0;
|
|
|
233933 |
|
|
|
233933 |
- pthread_mutex_lock(&conf->lock);
|
|
|
233933 |
- {
|
|
|
233933 |
- conf->fini_completed = _gf_true;
|
|
|
233933 |
- pthread_cond_broadcast(&conf->fini_complete_cond);
|
|
|
233933 |
- }
|
|
|
233933 |
- pthread_mutex_unlock(&conf->lock);
|
|
|
233933 |
+ this->private = NULL;
|
|
|
233933 |
+
|
|
|
233933 |
+ pthread_spin_destroy(&conf->fd_lock);
|
|
|
233933 |
+ pthread_mutex_destroy(&conf->lock);
|
|
|
233933 |
+ GF_FREE(conf);
|
|
|
233933 |
|
|
|
233933 |
out:
|
|
|
233933 |
return 0;
|
|
|
233933 |
@@ -2730,7 +2729,6 @@ init(xlator_t *this)
|
|
|
233933 |
goto out;
|
|
|
233933 |
|
|
|
233933 |
pthread_mutex_init(&conf->lock, NULL);
|
|
|
233933 |
- pthread_cond_init(&conf->fini_complete_cond, NULL);
|
|
|
233933 |
pthread_spin_init(&conf->fd_lock, 0);
|
|
|
233933 |
INIT_LIST_HEAD(&conf->saved_fds);
|
|
|
233933 |
|
|
|
233933 |
@@ -2789,7 +2787,6 @@ fini(xlator_t *this)
|
|
|
233933 |
if (!conf)
|
|
|
233933 |
return;
|
|
|
233933 |
|
|
|
233933 |
- conf->fini_completed = _gf_false;
|
|
|
233933 |
conf->destroy = 1;
|
|
|
233933 |
if (conf->rpc) {
|
|
|
233933 |
/* cleanup the saved-frames before last unref */
|
|
|
233933 |
@@ -2797,18 +2794,6 @@ fini(xlator_t *this)
|
|
|
233933 |
rpc_clnt_unref(conf->rpc);
|
|
|
233933 |
}
|
|
|
233933 |
|
|
|
233933 |
- pthread_mutex_lock(&conf->lock);
|
|
|
233933 |
- {
|
|
|
233933 |
- while (!conf->fini_completed)
|
|
|
233933 |
- pthread_cond_wait(&conf->fini_complete_cond, &conf->lock);
|
|
|
233933 |
- }
|
|
|
233933 |
- pthread_mutex_unlock(&conf->lock);
|
|
|
233933 |
-
|
|
|
233933 |
- pthread_spin_destroy(&conf->fd_lock);
|
|
|
233933 |
- pthread_mutex_destroy(&conf->lock);
|
|
|
233933 |
- pthread_cond_destroy(&conf->fini_complete_cond);
|
|
|
233933 |
- GF_FREE(conf);
|
|
|
233933 |
-
|
|
|
233933 |
/* Saved Fds */
|
|
|
233933 |
/* TODO: */
|
|
|
233933 |
|
|
|
233933 |
diff --git a/xlators/protocol/client/src/client.h b/xlators/protocol/client/src/client.h
|
|
|
233933 |
index 8dcd72f..f12fa61 100644
|
|
|
233933 |
--- a/xlators/protocol/client/src/client.h
|
|
|
233933 |
+++ b/xlators/protocol/client/src/client.h
|
|
|
233933 |
@@ -235,12 +235,6 @@ typedef struct clnt_conf {
|
|
|
233933 |
* up, disconnects can be
|
|
|
233933 |
* logged
|
|
|
233933 |
*/
|
|
|
233933 |
-
|
|
|
233933 |
- gf_boolean_t old_protocol; /* used only for old-protocol testing */
|
|
|
233933 |
- pthread_cond_t fini_complete_cond; /* Used to wait till we finsh the fini
|
|
|
233933 |
- compltely, ie client_fini_complete
|
|
|
233933 |
- to return*/
|
|
|
233933 |
- gf_boolean_t fini_completed;
|
|
|
233933 |
} clnt_conf_t;
|
|
|
233933 |
|
|
|
233933 |
typedef struct _client_fd_ctx {
|
|
|
233933 |
--
|
|
|
233933 |
1.8.3.1
|
|
|
233933 |
|