summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXiubo Li <xiubli@redhat.com>2019-07-26 12:34:52 +0800
committerAmar Tumballi <amarts@redhat.com>2019-07-29 04:43:56 +0000
commit799edc73c3d4f694c365c6a7c27c9ab8eed5f260 (patch)
tree2c135042a67ffc04091fa2adfa1ea5fdf582cd16
parent26b9c85861f058a4a8335b28f49410ba061e7c1a (diff)
event: rename event_XXX with gf_ prefixed
I hit one crash issue when using the libgfapi. In the libgfapi it will call glfs_poller() --> event_dispatch() in file api/src/glfs.c:721, and the event_dispatch() is defined by libgluster locally, the problem is the name of event_dispatch() is the extremly the same with the one from libevent package form the OS. For example, if a executable program Foo, which will also use and link the libevent and the libgfapi at the same time, I can hit the crash, like: kernel: glfs_glfspoll[68486]: segfault at 1c0 ip 00007fef006fd2b8 sp 00007feeeaffce30 error 4 in libevent-2.0.so.5.1.9[7fef006ed000+46000] The link for Foo is: lib_foo_LADD = -levent $(GFAPI_LIBS) It will crash. This is because the glfs_poller() is calling the event_dispatch() from the libevent, not the libglsuter. The gfapi link info : GFAPI_LIBS = -lacl -lgfapi -lglusterfs -lgfrpc -lgfxdr -luuid If I link Foo like: lib_foo_LADD = $(GFAPI_LIBS) -levent It will works well without any problem. And if Foo call one private lib, such as handler_glfs.so, and the handler_glfs.so will link the GFAPI_LIBS directly, while the Foo won't and it will dlopen(handler_glfs.so), then the crash will be hit everytime. The link info will be: foo_LADD = -levent libhandler_glfs_LIBADD = $(GFAPI_LIBS) I can avoid the crash temporarily by linking the GFAPI_LIBS in Foo too like: foo_LADD = $(GFAPI_LIBS) -levent libhandler_glfs_LIBADD = $(GFAPI_LIBS) But this is ugly since the Foo won't use any APIs from the GFAPI_LIBS. And in some cases when the --as-needed link option is added(on many dists it is added as default), then the crash is back again, the above workaround won't work. Fixes: #699 Change-Id: I38f0200b941bd1cff4bf3066fca2fc1f9a5263aa Signed-off-by: Xiubo Li <xiubli@redhat.com>
-rw-r--r--api/src/glfs.c10
-rw-r--r--cli/src/cli-rl.c6
-rw-r--r--cli/src/cli.c6
-rw-r--r--glusterfsd/src/glusterfsd.c6
-rw-r--r--libglusterfs/src/event.c37
-rw-r--r--libglusterfs/src/glusterfs/gf-event.h25
-rw-r--r--libglusterfs/src/libglusterfs.sym20
-rw-r--r--rpc/rpc-lib/src/autoscale-threads.c2
-rw-r--r--rpc/rpc-transport/socket/src/socket.c50
-rw-r--r--xlators/features/changelog/lib/src/gf-changelog.c4
-rw-r--r--xlators/features/changelog/src/changelog-rpc-common.c2
-rw-r--r--xlators/mgmt/glusterd/src/glusterd.c2
-rw-r--r--xlators/nfs/server/src/nfs.c4
-rw-r--r--xlators/protocol/client/src/client.c4
-rw-r--r--xlators/protocol/server/src/server.c4
15 files changed, 92 insertions, 90 deletions
diff --git a/api/src/glfs.c b/api/src/glfs.c
index bdc2a07..f5c9d54 100644
--- a/api/src/glfs.c
+++ b/api/src/glfs.c
@@ -92,8 +92,8 @@ glusterfs_ctx_defaults_init(glusterfs_ctx_t *ctx)
goto err;
}
- ctx->event_pool = event_pool_new(DEFAULT_EVENT_POOL_SIZE,
- STARTING_EVENT_THREADS);
+ ctx->event_pool = gf_event_pool_new(DEFAULT_EVENT_POOL_SIZE,
+ STARTING_EVENT_THREADS);
if (!ctx->event_pool) {
goto err;
}
@@ -725,7 +725,7 @@ glfs_poller(void *data)
fs = data;
- event_dispatch(fs->ctx->event_pool);
+ gf_event_dispatch(fs->ctx->event_pool);
return NULL;
}
@@ -1189,7 +1189,7 @@ glusterfs_ctx_destroy(glusterfs_ctx_t *ctx)
}
/* Free the event pool */
- ret = event_pool_destroy(ctx->event_pool);
+ ret = gf_event_pool_destroy(ctx->event_pool);
/* Free the iobuf pool */
iobuf_pool_destroy(ctx->iobuf_pool);
@@ -1359,7 +1359,7 @@ pub_glfs_fini(struct glfs *fs)
syncenv_destroy(ctx->env);
/* Join the poller thread */
- if (event_dispatch_destroy(ctx->event_pool) < 0)
+ if (gf_event_dispatch_destroy(ctx->event_pool) < 0)
ret = -1;
}
diff --git a/cli/src/cli-rl.c b/cli/src/cli-rl.c
index b6f87b1..7a38a0b 100644
--- a/cli/src/cli-rl.c
+++ b/cli/src/cli-rl.c
@@ -112,7 +112,7 @@ cli_rl_stdin(int fd, int idx, int gen, void *data, int poll_out, int poll_in,
rl_callback_read_char();
- event_handled(state->ctx->event_pool, fd, idx, gen);
+ gf_event_handled(state->ctx->event_pool, fd, idx, gen);
return;
}
@@ -379,8 +379,8 @@ cli_rl_enable(struct cli_state *state)
goto out;
}
- ret = event_register(state->ctx->event_pool, 0, cli_rl_stdin, state, 1, 0,
- 0);
+ ret = gf_event_register(state->ctx->event_pool, 0, cli_rl_stdin, state, 1,
+ 0, 0);
if (ret == -1)
goto out;
diff --git a/cli/src/cli.c b/cli/src/cli.c
index d6f2e4a..fac32d3 100644
--- a/cli/src/cli.c
+++ b/cli/src/cli.c
@@ -122,8 +122,8 @@ glusterfs_ctx_defaults_init(glusterfs_ctx_t *ctx)
goto out;
}
- ctx->event_pool = event_pool_new(DEFAULT_EVENT_POOL_SIZE,
- STARTING_EVENT_THREADS);
+ ctx->event_pool = gf_event_pool_new(DEFAULT_EVENT_POOL_SIZE,
+ STARTING_EVENT_THREADS);
if (!ctx->event_pool) {
gf_log("cli", GF_LOG_ERROR, "Failed to create event pool.");
goto out;
@@ -862,7 +862,7 @@ main(int argc, char *argv[])
if (ret)
goto out;
- ret = event_dispatch(ctx->event_pool);
+ ret = gf_event_dispatch(ctx->event_pool);
out:
// glusterfs_ctx_destroy (ctx);
diff --git a/glusterfsd/src/glusterfsd.c b/glusterfsd/src/glusterfsd.c
index 8773f2d..cf6d9a7 100644
--- a/glusterfsd/src/glusterfsd.c
+++ b/glusterfsd/src/glusterfsd.c
@@ -1766,8 +1766,8 @@ glusterfs_ctx_defaults_init(glusterfs_ctx_t *ctx)
goto out;
}
- ctx->event_pool = event_pool_new(DEFAULT_EVENT_POOL_SIZE,
- STARTING_EVENT_THREADS);
+ ctx->event_pool = gf_event_pool_new(DEFAULT_EVENT_POOL_SIZE,
+ STARTING_EVENT_THREADS);
if (!ctx->event_pool) {
gf_msg("", GF_LOG_CRITICAL, 0, glusterfsd_msg_14,
"ERROR: glusterfs event pool creation failed");
@@ -2914,7 +2914,7 @@ main(int argc, char *argv[])
if (ret)
goto out;
- ret = event_dispatch(ctx->event_pool);
+ ret = gf_event_dispatch(ctx->event_pool);
out:
// glusterfs_ctx_destroy (ctx);
diff --git a/libglusterfs/src/event.c b/libglusterfs/src/event.c
index 35a2f5c..235128b 100644
--- a/libglusterfs/src/event.c
+++ b/libglusterfs/src/event.c
@@ -22,7 +22,7 @@
#include "glusterfs/syscall.h"
struct event_pool *
-event_pool_new(int count, int eventthreadcount)
+gf_event_pool_new(int count, int eventthreadcount)
{
struct event_pool *event_pool = NULL;
extern struct event_ops event_ops_poll;
@@ -51,8 +51,9 @@ event_pool_new(int count, int eventthreadcount)
}
int
-event_register(struct event_pool *event_pool, int fd, event_handler_t handler,
- void *data, int poll_in, int poll_out, char notify_poller_death)
+gf_event_register(struct event_pool *event_pool, int fd,
+ event_handler_t handler, void *data, int poll_in,
+ int poll_out, char notify_poller_death)
{
int ret = -1;
@@ -65,7 +66,7 @@ out:
}
int
-event_unregister(struct event_pool *event_pool, int fd, int idx)
+gf_event_unregister(struct event_pool *event_pool, int fd, int idx)
{
int ret = -1;
@@ -78,7 +79,7 @@ out:
}
int
-event_unregister_close(struct event_pool *event_pool, int fd, int idx)
+gf_event_unregister_close(struct event_pool *event_pool, int fd, int idx)
{
int ret = -1;
@@ -91,8 +92,8 @@ out:
}
int
-event_select_on(struct event_pool *event_pool, int fd, int idx_hint,
- int poll_in, int poll_out)
+gf_event_select_on(struct event_pool *event_pool, int fd, int idx_hint,
+ int poll_in, int poll_out)
{
int ret = -1;
@@ -105,7 +106,7 @@ out:
}
int
-event_dispatch(struct event_pool *event_pool)
+gf_event_dispatch(struct event_pool *event_pool)
{
int ret = -1;
@@ -120,7 +121,7 @@ out:
}
int
-event_reconfigure_threads(struct event_pool *event_pool, int value)
+gf_event_reconfigure_threads(struct event_pool *event_pool, int value)
{
int ret = -1;
@@ -134,7 +135,7 @@ out:
}
int
-event_pool_destroy(struct event_pool *event_pool)
+gf_event_pool_destroy(struct event_pool *event_pool)
{
int ret = -1;
int destroy = 0, activethreadcount = 0;
@@ -175,13 +176,13 @@ poller_destroy_handler(int fd, int idx, int gen, void *data, int poll_out,
}
out:
- event_handled(destroy->pool, fd, idx, gen);
+ gf_event_handled(destroy->pool, fd, idx, gen);
return;
}
/* This function destroys all the poller threads.
- * Note: to be called before event_pool_destroy is called.
+ * Note: to be called before gf_event_pool_destroy is called.
* The order in which cleaning is performed:
* - Register a pipe fd(this is for waking threads in poll()/epoll_wait())
* - Set the destroy mode, which this no new event registration will succeed
@@ -192,7 +193,7 @@ out:
* threads are destroyed)
*/
int
-event_dispatch_destroy(struct event_pool *event_pool)
+gf_event_dispatch_destroy(struct event_pool *event_pool)
{
int ret = -1, threadcount = 0;
int fd[2] = {-1};
@@ -230,8 +231,8 @@ event_dispatch_destroy(struct event_pool *event_pool)
/* From the main thread register an event on the pipe fd[0],
*/
- idx = event_register(event_pool, fd[0], poller_destroy_handler, &data, 1, 0,
- 0);
+ idx = gf_event_register(event_pool, fd[0], poller_destroy_handler, &data, 1,
+ 0, 0);
if (idx < 0)
goto out;
@@ -245,7 +246,7 @@ event_dispatch_destroy(struct event_pool *event_pool)
}
pthread_mutex_unlock(&event_pool->mutex);
- ret = event_reconfigure_threads(event_pool, 0);
+ ret = gf_event_reconfigure_threads(event_pool, 0);
if (ret < 0)
goto out;
@@ -280,7 +281,7 @@ event_dispatch_destroy(struct event_pool *event_pool)
}
pthread_mutex_unlock(&event_pool->mutex);
- ret = event_unregister(event_pool, fd[0], idx);
+ ret = gf_event_unregister(event_pool, fd[0], idx);
out:
if (fd[0] != -1)
@@ -292,7 +293,7 @@ out:
}
int
-event_handled(struct event_pool *event_pool, int fd, int idx, int gen)
+gf_event_handled(struct event_pool *event_pool, int fd, int idx, int gen)
{
int ret = 0;
diff --git a/libglusterfs/src/glusterfs/gf-event.h b/libglusterfs/src/glusterfs/gf-event.h
index 0305194..c0f05e7 100644
--- a/libglusterfs/src/glusterfs/gf-event.h
+++ b/libglusterfs/src/glusterfs/gf-event.h
@@ -110,26 +110,27 @@ struct event_ops {
};
struct event_pool *
-event_pool_new(int count, int eventthreadcount);
+gf_event_pool_new(int count, int eventthreadcount);
int
-event_select_on(struct event_pool *event_pool, int fd, int idx, int poll_in,
- int poll_out);
+gf_event_select_on(struct event_pool *event_pool, int fd, int idx, int poll_in,
+ int poll_out);
int
-event_register(struct event_pool *event_pool, int fd, event_handler_t handler,
- void *data, int poll_in, int poll_out, char notify_poller_death);
+gf_event_register(struct event_pool *event_pool, int fd,
+ event_handler_t handler, void *data, int poll_in,
+ int poll_out, char notify_poller_death);
int
-event_unregister(struct event_pool *event_pool, int fd, int idx);
+gf_event_unregister(struct event_pool *event_pool, int fd, int idx);
int
-event_unregister_close(struct event_pool *event_pool, int fd, int idx);
+gf_event_unregister_close(struct event_pool *event_pool, int fd, int idx);
int
-event_dispatch(struct event_pool *event_pool);
+gf_event_dispatch(struct event_pool *event_pool);
int
-event_reconfigure_threads(struct event_pool *event_pool, int value);
+gf_event_reconfigure_threads(struct event_pool *event_pool, int value);
int
-event_pool_destroy(struct event_pool *event_pool);
+gf_event_pool_destroy(struct event_pool *event_pool);
int
-event_dispatch_destroy(struct event_pool *event_pool);
+gf_event_dispatch_destroy(struct event_pool *event_pool);
int
-event_handled(struct event_pool *event_pool, int fd, int idx, int gen);
+gf_event_handled(struct event_pool *event_pool, int fd, int idx, int gen);
#endif /* _GF_EVENT_H_ */
diff --git a/libglusterfs/src/libglusterfs.sym b/libglusterfs/src/libglusterfs.sym
index a4065e1..48548c4 100644
--- a/libglusterfs/src/libglusterfs.sym
+++ b/libglusterfs/src/libglusterfs.sym
@@ -438,16 +438,16 @@ eh_dump
eh_new
eh_save_history
entry_copy
-event_dispatch
-event_dispatch_destroy
-event_handled
-event_pool_destroy
-event_pool_new
-event_reconfigure_threads
-event_register
-event_select_on
-event_unregister
-event_unregister_close
+gf_event_dispatch
+gf_event_dispatch_destroy
+gf_event_handled
+gf_event_pool_destroy
+gf_event_pool_new
+gf_event_reconfigure_threads
+gf_event_register
+gf_event_select_on
+gf_event_unregister
+gf_event_unregister_close
fd_anonymous
fd_anonymous_with_flags
fd_bind
diff --git a/rpc/rpc-lib/src/autoscale-threads.c b/rpc/rpc-lib/src/autoscale-threads.c
index 2c53ebb..a954ae7 100644
--- a/rpc/rpc-lib/src/autoscale-threads.c
+++ b/rpc/rpc-lib/src/autoscale-threads.c
@@ -18,5 +18,5 @@ rpcsvc_autoscale_threads(glusterfs_ctx_t *ctx, rpcsvc_t *rpc, int incr)
int thread_count = pool->eventthreadcount;
pool->auto_thread_count += incr;
- (void)event_reconfigure_threads(pool, thread_count + incr);
+ (void)gf_event_reconfigure_threads(pool, thread_count + incr);
}
diff --git a/rpc/rpc-transport/socket/src/socket.c b/rpc/rpc-transport/socket/src/socket.c
index 4af8022..c2d7d50 100644
--- a/rpc/rpc-transport/socket/src/socket.c
+++ b/rpc/rpc-transport/socket/src/socket.c
@@ -1149,7 +1149,7 @@ __socket_reset(rpc_transport_t *this)
memset(&priv->incoming, 0, sizeof(priv->incoming));
- event_unregister_close(this->ctx->event_pool, priv->sock, priv->idx);
+ gf_event_unregister_close(this->ctx->event_pool, priv->sock, priv->idx);
priv->sock = -1;
priv->idx = -1;
@@ -1338,8 +1338,8 @@ __socket_ioq_churn(rpc_transport_t *this)
if (list_empty(&priv->ioq)) {
/* all pending writes done, not interested in POLLOUT */
- priv->idx = event_select_on(this->ctx->event_pool, priv->sock,
- priv->idx, -1, 0);
+ priv->idx = gf_event_select_on(this->ctx->event_pool, priv->sock,
+ priv->idx, -1, 0);
}
out:
@@ -2596,7 +2596,7 @@ socket_event_poll_in(rpc_transport_t *this, gf_boolean_t notify_handled)
}
if (notify_handled && (ret != -1))
- event_handled(ctx->event_pool, priv->sock, priv->idx, priv->gen);
+ gf_event_handled(ctx->event_pool, priv->sock, priv->idx, priv->gen);
if (pollin) {
rpc_transport_ref(this);
@@ -2710,10 +2710,10 @@ ssl_rearm_event_fd(rpc_transport_t *this)
fd = priv->sock;
if (priv->ssl_error_required == SSL_ERROR_WANT_READ)
- event_select_on(ctx->event_pool, fd, idx, 1, -1);
+ gf_event_select_on(ctx->event_pool, fd, idx, 1, -1);
if (priv->ssl_error_required == SSL_ERROR_WANT_WRITE)
- event_select_on(ctx->event_pool, fd, idx, -1, 1);
- event_handled(ctx->event_pool, fd, idx, gen);
+ gf_event_select_on(ctx->event_pool, fd, idx, -1, 1);
+ gf_event_handled(ctx->event_pool, fd, idx, gen);
}
static int
@@ -2747,8 +2747,8 @@ ssl_handle_server_connection_attempt(rpc_transport_t *this)
ret = ssl_complete_connection(this);
if (ret == 0) {
/* nothing to do */
- event_select_on(ctx->event_pool, fd, idx, 1, 0);
- event_handled(ctx->event_pool, fd, idx, gen);
+ gf_event_select_on(ctx->event_pool, fd, idx, 1, 0);
+ gf_event_handled(ctx->event_pool, fd, idx, gen);
ret = 1;
} else {
if (errno == EAGAIN) {
@@ -2802,7 +2802,7 @@ ssl_handle_client_connection_attempt(rpc_transport_t *this)
ret = ssl_complete_connection(this);
if (ret == 0) {
ret = socket_connect_finish(this);
- event_select_on(ctx->event_pool, fd, idx, 1, 0);
+ gf_event_select_on(ctx->event_pool, fd, idx, 1, 0);
gf_log(this->name, GF_LOG_TRACE, ">>> completed client connect");
} else {
if (errno == EAGAIN) {
@@ -2871,7 +2871,7 @@ socket_handle_client_connection_attempt(rpc_transport_t *this)
* return 1
*/
ret = 1;
- event_handled(ctx->event_pool, fd, idx, gen);
+ gf_event_handled(ctx->event_pool, fd, idx, gen);
}
}
return ret;
@@ -2907,7 +2907,7 @@ socket_complete_connection(rpc_transport_t *this)
* socket_server_event_handler()
*/
priv->accepted = _gf_true;
- event_handled(ctx->event_pool, fd, idx, gen);
+ gf_event_handled(ctx->event_pool, fd, idx, gen);
ret = 1;
} else {
ret = socket_handle_client_connection_attempt(this);
@@ -3021,7 +3021,7 @@ socket_event_handler(int fd, int idx, int gen, void *data, int poll_in,
rpc_transport_unref(this);
} else if (!notify_handled) {
- event_handled(ctx->event_pool, fd, idx, gen);
+ gf_event_handled(ctx->event_pool, fd, idx, gen);
}
out:
@@ -3082,7 +3082,7 @@ socket_server_event_handler(int fd, int idx, int gen, void *data, int poll_in,
new_sock = sys_accept(priv->sock, SA(&new_sockaddr), &addrlen, aflags);
- event_handled(ctx->event_pool, fd, idx, gen);
+ gf_event_handled(ctx->event_pool, fd, idx, gen);
if (new_sock == -1) {
gf_log(this->name, GF_LOG_WARNING, "accept on %d failed (%s)",
@@ -3248,7 +3248,7 @@ socket_server_event_handler(int fd, int idx, int gen, void *data, int poll_in,
ret = rpc_transport_notify(this, RPC_TRANSPORT_ACCEPT, new_trans);
if (ret != -1) {
- new_priv->idx = event_register(
+ new_priv->idx = gf_event_register(
ctx->event_pool, new_sock, socket_event_handler, new_trans,
1, 0, new_trans->notify_poller_death);
if (new_priv->idx == -1) {
@@ -3625,9 +3625,9 @@ socket_connect(rpc_transport_t *this, int port)
refd = _gf_true;
this->listener = this;
- priv->idx = event_register(ctx->event_pool, priv->sock,
- socket_event_handler, this, 1, 1,
- this->notify_poller_death);
+ priv->idx = gf_event_register(ctx->event_pool, priv->sock,
+ socket_event_handler, this, 1, 1,
+ this->notify_poller_death);
if (priv->idx == -1) {
gf_log("", GF_LOG_WARNING,
"failed to register the event; "
@@ -3801,9 +3801,9 @@ socket_listen(rpc_transport_t *this)
rpc_transport_ref(this);
- priv->idx = event_register(ctx->event_pool, priv->sock,
- socket_server_event_handler, this, 1, 0,
- this->notify_poller_death);
+ priv->idx = gf_event_register(ctx->event_pool, priv->sock,
+ socket_server_event_handler, this, 1, 0,
+ this->notify_poller_death);
if (priv->idx == -1) {
gf_log(this->name, GF_LOG_WARNING,
@@ -3872,8 +3872,8 @@ socket_submit_outgoing_msg(rpc_transport_t *this, rpc_transport_msg_t *msg)
}
if (need_poll_out) {
/* first entry to wait. continue writing on POLLOUT */
- priv->idx = event_select_on(ctx->event_pool, priv->sock, priv->idx,
- -1, 1);
+ priv->idx = gf_event_select_on(ctx->event_pool, priv->sock,
+ priv->idx, -1, 1);
}
}
unlock:
@@ -3990,8 +3990,8 @@ socket_throttle(rpc_transport_t *this, gf_boolean_t onoff)
* registered fd mapping. */
if (priv->connected == 1)
- priv->idx = event_select_on(this->ctx->event_pool, priv->sock,
- priv->idx, (int)!onoff, -1);
+ priv->idx = gf_event_select_on(this->ctx->event_pool, priv->sock,
+ priv->idx, (int)!onoff, -1);
}
pthread_mutex_unlock(&priv->out_lock);
return 0;
diff --git a/xlators/features/changelog/lib/src/gf-changelog.c b/xlators/features/changelog/lib/src/gf-changelog.c
index d6acb37..59c9897 100644
--- a/xlators/features/changelog/lib/src/gf-changelog.c
+++ b/xlators/features/changelog/lib/src/gf-changelog.c
@@ -102,8 +102,8 @@ gf_changelog_ctx_defaults_init(glusterfs_ctx_t *ctx)
if (!ctx->iobuf_pool)
goto free_pool;
- ctx->event_pool = event_pool_new(GF_CHANGELOG_EVENT_POOL_SIZE,
- GF_CHANGELOG_EVENT_THREAD_COUNT);
+ ctx->event_pool = gf_event_pool_new(GF_CHANGELOG_EVENT_POOL_SIZE,
+ GF_CHANGELOG_EVENT_THREAD_COUNT);
if (!ctx->event_pool)
goto free_pool;
diff --git a/xlators/features/changelog/src/changelog-rpc-common.c b/xlators/features/changelog/src/changelog-rpc-common.c
index dcdcfb1..991d77b 100644
--- a/xlators/features/changelog/src/changelog-rpc-common.c
+++ b/xlators/features/changelog/src/changelog-rpc-common.c
@@ -28,7 +28,7 @@ changelog_rpc_poller(void *arg)
{
xlator_t *this = arg;
- (void)event_dispatch(this->ctx->event_pool);
+ (void)gf_event_dispatch(this->ctx->event_pool);
return NULL;
}
diff --git a/xlators/mgmt/glusterd/src/glusterd.c b/xlators/mgmt/glusterd/src/glusterd.c
index 2cae48a..39f46a2 100644
--- a/xlators/mgmt/glusterd/src/glusterd.c
+++ b/xlators/mgmt/glusterd/src/glusterd.c
@@ -1997,7 +1997,7 @@ init(xlator_t *this)
GF_OPTION_INIT("event-threads", workers, int32, out);
if (workers > 0 && workers != conf->workers) {
conf->workers = workers;
- ret = event_reconfigure_threads(this->ctx->event_pool, workers);
+ ret = gf_event_reconfigure_threads(this->ctx->event_pool, workers);
if (ret)
goto out;
}
diff --git a/xlators/nfs/server/src/nfs.c b/xlators/nfs/server/src/nfs.c
index aef88ac..cab57bb 100644
--- a/xlators/nfs/server/src/nfs.c
+++ b/xlators/nfs/server/src/nfs.c
@@ -1115,7 +1115,7 @@ nfs_init_state(xlator_t *this)
GF_OPTION_INIT("nfs.event-threads", nfs->event_threads, uint32,
free_foppool);
- event_reconfigure_threads(this->ctx->event_pool, nfs->event_threads);
+ gf_event_reconfigure_threads(this->ctx->event_pool, nfs->event_threads);
this->private = (void *)nfs;
INIT_LIST_HEAD(&nfs->versions);
@@ -1338,7 +1338,7 @@ nfs_reconfigure_state(xlator_t *this, dict_t *options)
GF_OPTION_RECONF("nfs.event-threads", nfs->event_threads, options, uint32,
out);
- event_reconfigure_threads(this->ctx->event_pool, nfs->event_threads);
+ gf_event_reconfigure_threads(this->ctx->event_pool, nfs->event_threads);
ret = 0;
out:
diff --git a/xlators/protocol/client/src/client.c b/xlators/protocol/client/src/client.c
index 94d878a..776e716 100644
--- a/xlators/protocol/client/src/client.c
+++ b/xlators/protocol/client/src/client.c
@@ -2637,8 +2637,8 @@ client_check_event_threads(xlator_t *this, clnt_conf_t *conf, int32_t old,
return 0;
conf->event_threads = new;
- return event_reconfigure_threads(this->ctx->event_pool,
- conf->event_threads);
+ return gf_event_reconfigure_threads(this->ctx->event_pool,
+ conf->event_threads);
}
int
diff --git a/xlators/protocol/server/src/server.c b/xlators/protocol/server/src/server.c
index 45a5e96..f79fe26 100644
--- a/xlators/protocol/server/src/server.c
+++ b/xlators/protocol/server/src/server.c
@@ -699,7 +699,7 @@ server_check_event_threads(xlator_t *this, server_conf_t *conf, int32_t new)
return 0;
}
- return event_reconfigure_threads(pool, target);
+ return gf_event_reconfigure_threads(pool, target);
}
int
@@ -1005,7 +1005,7 @@ server_cleanup(xlator_t *this, server_conf_t *conf)
if (this->ctx->event_pool) {
/* Free the event pool */
- (void)event_pool_destroy(this->ctx->event_pool);
+ (void)gf_event_pool_destroy(this->ctx->event_pool);
}
if (dict_get_sizen(this->options, "config-directory")) {