diff options
Diffstat (limited to 'xlators/features/changelog/src')
-rw-r--r-- | xlators/features/changelog/src/changelog-rpc.c | 13 | ||||
-rw-r--r-- | xlators/features/changelog/src/changelog.c | 5 |
2 files changed, 12 insertions, 6 deletions
diff --git a/xlators/features/changelog/src/changelog-rpc.c b/xlators/features/changelog/src/changelog-rpc.c index 4145608f3a7..5524e433cbb 100644 --- a/xlators/features/changelog/src/changelog-rpc.c +++ b/xlators/features/changelog/src/changelog-rpc.c @@ -71,6 +71,8 @@ changelog_init_rpc_threads (xlator_t *this, changelog_priv_t *priv, int j = 0; int ret = 0; changelog_clnt_t *conn = NULL; + char thread_name[GF_THREAD_NAMEMAX] = {0,}; + conn = &priv->connections; @@ -97,8 +99,8 @@ changelog_init_rpc_threads (xlator_t *this, changelog_priv_t *priv, goto cleanup_active_lock; /* spawn reverse connection thread */ - ret = pthread_create (&priv->connector, - NULL, changelog_ev_connector, conn); + ret = gf_thread_create (&priv->connector, + NULL, changelog_ev_connector, conn, "clogecon"); if (ret != 0) goto cleanup_wait_lock; @@ -110,8 +112,11 @@ changelog_init_rpc_threads (xlator_t *this, changelog_priv_t *priv, /* spawn dispatcher threads */ for (; j < nr_dispatchers; j++) { - ret = pthread_create (&priv->ev_dispatcher[j], - NULL, changelog_ev_dispatch, conn); + snprintf (thread_name, sizeof(thread_name), + "%s%d", "clogd", j); + ret = gf_thread_create (&priv->ev_dispatcher[j], + NULL, changelog_ev_dispatch, conn, + thread_name); if (ret != 0) { changelog_cleanup_dispatchers (this, priv, j); break; diff --git a/xlators/features/changelog/src/changelog.c b/xlators/features/changelog/src/changelog.c index 8758b7691a1..8b22a049dc9 100644 --- a/xlators/features/changelog/src/changelog.c +++ b/xlators/features/changelog/src/changelog.c @@ -2073,14 +2073,15 @@ changelog_spawn_helper_threads (xlator_t *this, changelog_priv_t *priv) priv->cr.notify = _gf_false; priv->cr.this = this; ret = gf_thread_create (&priv->cr.rollover_th, - NULL, changelog_rollover, priv); + NULL, changelog_rollover, priv, "clogro"); if (ret) goto out; if (priv->fsync_interval) { priv->cf.this = this; ret = gf_thread_create (&priv->cf.fsync_th, - NULL, changelog_fsync_thread, priv); + NULL, changelog_fsync_thread, priv, + "clogfsyn"); } if (ret) |