changelog xlator: avoid unsupported threaded event-poll usage
The changelog xlator was modified to use a poller thread, which uses the same event pool as the xlator stack. Unfortunately, such threaded usage of event pool is not supported by event-poll code, only event-epoll supports it. As a result, platforms such as NetBSD that lack epoll support got broken. The fix is to remove the poller thread, which does not cause any functionnality loss because the xlator stack event poll is functionnal. That lets NetBSD pass AFR tests again. BUG: 1129939 Change-Id: I3d73cf58e2ed8d92d9e0191f7abda3c37dea4159 Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org> Reviewed-on: http://review.gluster.org/10030 Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com> Reviewed-by: Venky Shankar <vshankar@redhat.com> Tested-by: Venky Shankar <vshankar@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
This commit is contained in:
parent
8907f67ba2
commit
86fa9298ea
@ -2489,7 +2489,8 @@ changelog_cleanup_rpc (xlator_t *this, changelog_priv_t *priv)
|
||||
rbuf_dtor (priv->rbuf);
|
||||
|
||||
/* cleanup poller thread */
|
||||
(void) changelog_thread_cleanup (this, priv->poller);
|
||||
if (priv->poller)
|
||||
(void) changelog_thread_cleanup (this, priv->poller);
|
||||
}
|
||||
|
||||
static int
|
||||
@ -2504,13 +2505,6 @@ changelog_init_rpc (xlator_t *this, changelog_priv_t *priv)
|
||||
/* initialize event selection */
|
||||
changelog_init_event_selection (this, selection);
|
||||
|
||||
ret = pthread_create (&priv->poller, NULL, changelog_rpc_poller, this);
|
||||
if (ret != 0) {
|
||||
gf_log (this->name, GF_LOG_ERROR,
|
||||
"failed to spawn poller thread");
|
||||
goto error_return;
|
||||
}
|
||||
|
||||
priv->rbuf = rbuf_init (NR_ROTT_BUFFS);
|
||||
if (!priv->rbuf)
|
||||
goto cleanup_thread;
|
||||
@ -2526,8 +2520,9 @@ changelog_init_rpc (xlator_t *this, changelog_priv_t *priv)
|
||||
cleanup_rbuf:
|
||||
rbuf_dtor (priv->rbuf);
|
||||
cleanup_thread:
|
||||
(void) changelog_thread_cleanup (this, priv->poller);
|
||||
error_return:
|
||||
if (priv->poller)
|
||||
(void) changelog_thread_cleanup (this, priv->poller);
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user