diff options
author | Poornima G <pgurusid@redhat.com> | 2016-03-19 04:38:47 -0400 |
---|---|---|
committer | Pranith Kumar Karampuri <pkarampu@redhat.com> | 2016-03-22 22:47:31 -0700 |
commit | 7fb3abaeae763b99ef387804b46943051ac6cbbc (patch) | |
tree | 2480b7193d39d8967d2a176143dac333c3863122 /libglusterfs/src/globals.c | |
parent | afbdcda3f4d6ffb906976064e0fa6f6b824718c8 (diff) | |
download | glusterfs-7fb3abaeae763b99ef387804b46943051ac6cbbc.tar.gz glusterfs-7fb3abaeae763b99ef387804b46943051ac6cbbc.tar.xz glusterfs-7fb3abaeae763b99ef387804b46943051ac6cbbc.zip |
gfapi: Fix the crashes caused by global_xlator and THIS
Issue: http://thread.gmane.org/gmane.comp.file-systems.gluster.devel/10922
The right fix for this is elaborate and intrusive, until it is in place,
this patch provides a temperory fix. This fix is necessary, as without this
libgfapi applications like qemu, samba, NFS ganesha are prone to crashes.
This patch will be reverted completely, once the actual fix gets accepted.
Change-Id: Ic975ab0bb03ba415cdf9bddba1534ba4d2d2820c
BUG: 1319374
Signed-off-by: Poornima G <pgurusid@redhat.com>
Reviewed-on: http://review.gluster.org/13784
Smoke: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Shyamsundar Ranganathan <srangana@redhat.com>
Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
Diffstat (limited to 'libglusterfs/src/globals.c')
-rw-r--r-- | libglusterfs/src/globals.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/libglusterfs/src/globals.c b/libglusterfs/src/globals.c index 3cc29c5491..435921d64c 100644 --- a/libglusterfs/src/globals.c +++ b/libglusterfs/src/globals.c @@ -72,6 +72,11 @@ const char *gf_fop_list[GF_FOP_MAXVALUE] = { }; /* THIS */ +/* This global ctx is a bad hack to prevent some of the libgfapi crashes. + * This should be removed once the patch on resource pool is accepted + */ +glusterfs_ctx_t *global_ctx = NULL; +pthread_mutex_t global_ctx_mutex = PTHREAD_MUTEX_INITIALIZER; xlator_t global_xlator; static pthread_key_t this_xlator_key; static pthread_key_t synctask_key; @@ -383,7 +388,7 @@ glusterfs_globals_init (glusterfs_ctx_t *ctx) { int ret = 0; - gf_log_globals_init (ctx); + gf_log_globals_init (ctx, GF_LOG_INFO); ret = pthread_once (&globals_inited, gf_globals_init_once); |