|
|
cb8e9e |
From fdda3f97ae45df1dbad87f11cd2b96b050c5fe2b Mon Sep 17 00:00:00 2001
|
|
|
cb8e9e |
From: Soumya Koduri <skoduri@redhat.com>
|
|
|
cb8e9e |
Date: Thu, 30 Jul 2015 17:03:50 +0530
|
|
|
cb8e9e |
Subject: [PATCH 279/279] logging: Stop using global xlator for log_buf allocations
|
|
|
cb8e9e |
|
|
|
cb8e9e |
This reverts commit 765849ee00f6661c9059122ff2346b03b224745f.
|
|
|
cb8e9e |
|
|
|
cb8e9e |
With http://review.gluster.org/#/c/10417/, struct mem_accnt
|
|
|
cb8e9e |
is no longer embedded in a xlator_t object, but instead is
|
|
|
cb8e9e |
allocated separately. Hence this workaround provided to avoid
|
|
|
cb8e9e |
crashes in logging infrastructure is no longer needed
|
|
|
cb8e9e |
|
|
|
cb8e9e |
This is a backport of the below fix -
|
|
|
cb8e9e |
http://review.gluster.org/11811
|
|
|
cb8e9e |
|
|
|
cb8e9e |
BUG: 1241761
|
|
|
cb8e9e |
Change-Id: Ibecf693b912c9d37029f9e1f9da684bf8b292c5e
|
|
|
cb8e9e |
Signed-off-by: Soumya Koduri <skoduri@redhat.com>
|
|
|
cb8e9e |
Reviewed-on: http://review.gluster.org/11811
|
|
|
cb8e9e |
Reviewed-by: N Balachandran <nbalacha@redhat.com>
|
|
|
cb8e9e |
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
|
|
|
cb8e9e |
Reviewed-on: https://code.engineering.redhat.com/gerrit/55415
|
|
|
cb8e9e |
Reviewed-by: Nithya Balachandran <nbalacha@redhat.com>
|
|
|
cb8e9e |
Reviewed-by: Kaleb Keithley <kkeithle@redhat.com>
|
|
|
cb8e9e |
Tested-by: Kaleb Keithley <kkeithle@redhat.com>
|
|
|
cb8e9e |
---
|
|
|
cb8e9e |
libglusterfs/src/logging.c | 13 -------------
|
|
|
cb8e9e |
1 files changed, 0 insertions(+), 13 deletions(-)
|
|
|
cb8e9e |
|
|
|
cb8e9e |
diff --git a/libglusterfs/src/logging.c b/libglusterfs/src/logging.c
|
|
|
cb8e9e |
index c81c5b1..8bbaa3e 100644
|
|
|
cb8e9e |
--- a/libglusterfs/src/logging.c
|
|
|
cb8e9e |
+++ b/libglusterfs/src/logging.c
|
|
|
cb8e9e |
@@ -297,18 +297,6 @@ log_buf_init (log_buf_t *buf, const char *domain, const char *file,
|
|
|
cb8e9e |
int errnum, uint64_t msgid, char **appmsgstr, int graph_id)
|
|
|
cb8e9e |
{
|
|
|
cb8e9e |
int ret = -1;
|
|
|
cb8e9e |
- xlator_t *old_THIS;
|
|
|
cb8e9e |
- extern xlator_t global_xlator;
|
|
|
cb8e9e |
-
|
|
|
cb8e9e |
- /*
|
|
|
cb8e9e |
- * The current translator will be put in the block header for any
|
|
|
cb8e9e |
- * memory block we allocate here. Unfortunately, these objects might
|
|
|
cb8e9e |
- * outlive the current translator, and if we then try to dereference
|
|
|
cb8e9e |
- * that pointer we go BOOM. Since this is really a global structure,
|
|
|
cb8e9e |
- * use the global translator.
|
|
|
cb8e9e |
- */
|
|
|
cb8e9e |
- old_THIS = THIS;
|
|
|
cb8e9e |
- THIS = &global_xlator;
|
|
|
cb8e9e |
|
|
|
cb8e9e |
if (!buf || !domain || !file || !function || !appmsgstr || !*appmsgstr)
|
|
|
cb8e9e |
goto out;
|
|
|
cb8e9e |
@@ -339,7 +327,6 @@ log_buf_init (log_buf_t *buf, const char *domain, const char *file,
|
|
|
cb8e9e |
|
|
|
cb8e9e |
ret = 0;
|
|
|
cb8e9e |
out:
|
|
|
cb8e9e |
- THIS = old_THIS;
|
|
|
cb8e9e |
return ret;
|
|
|
cb8e9e |
}
|
|
|
cb8e9e |
|
|
|
cb8e9e |
--
|
|
|
cb8e9e |
1.7.1
|
|
|
cb8e9e |
|