summaryrefslogtreecommitdiffstats
path: root/xlators
diff options
context:
space:
mode:
Diffstat (limited to 'xlators')
-rw-r--r--xlators/cluster/dht/src/dht-rebalance.c3
-rw-r--r--xlators/features/changelog/lib/src/gf-history-changelog.c4
-rw-r--r--xlators/features/changelog/src/changelog-rpc.c2
-rw-r--r--xlators/performance/io-threads/src/io-threads.c2
4 files changed, 5 insertions, 6 deletions
diff --git a/xlators/cluster/dht/src/dht-rebalance.c b/xlators/cluster/dht/src/dht-rebalance.c
index 1f1beb8dca3..fcc0391f802 100644
--- a/xlators/cluster/dht/src/dht-rebalance.c
+++ b/xlators/cluster/dht/src/dht-rebalance.c
@@ -4642,7 +4642,7 @@ gf_defrag_parallel_migration_init (xlator_t *this, gf_defrag_info_t *defrag,
/*Spawn Threads Here*/
while (index < thread_spawn_count) {
snprintf (thread_name, sizeof(thread_name),
- "%s%d", "dhtmig", index + 1);
+ "dhtmig%d", ((index + 1) & 0x3ff));
ret = gf_thread_create (&(tid[index]), NULL,
&gf_defrag_task, (void *)defrag,
thread_name);
@@ -4885,7 +4885,6 @@ gf_defrag_start_crawl (void *data)
} else {
fc_thread_started = _gf_true;
}
-
}
diff --git a/xlators/features/changelog/lib/src/gf-history-changelog.c b/xlators/features/changelog/lib/src/gf-history-changelog.c
index 7b973b674a4..fd92dd7ed0b 100644
--- a/xlators/features/changelog/lib/src/gf-history-changelog.c
+++ b/xlators/features/changelog/lib/src/gf-history-changelog.c
@@ -618,8 +618,8 @@ gf_history_consume (void * data)
curr->retval = 0;
memset (curr->changelog, '\0', PATH_MAX);
- snprintf (thread_name, sizeof(thread_name), "%s%d",
- "clogc", iter + 1);
+ snprintf (thread_name, sizeof(thread_name),
+ "clogc%03hx", ((iter + 1) & 0x3ff));
ret = gf_thread_create (&th_id[iter], NULL,
gf_changelog_consume_wrap, curr,
diff --git a/xlators/features/changelog/src/changelog-rpc.c b/xlators/features/changelog/src/changelog-rpc.c
index 793e7a8aff4..9027fe10a2a 100644
--- a/xlators/features/changelog/src/changelog-rpc.c
+++ b/xlators/features/changelog/src/changelog-rpc.c
@@ -116,7 +116,7 @@ changelog_init_rpc_threads (xlator_t *this, changelog_priv_t *priv,
/* spawn dispatcher threads */
for (; j < nr_dispatchers; j++) {
snprintf (thread_name, sizeof(thread_name),
- "%s%d", "clogd", j);
+ "clogd%03hx", (j & 0x3ff));
ret = gf_thread_create (&priv->ev_dispatcher[j],
NULL, changelog_ev_dispatch, conn,
thread_name);
diff --git a/xlators/performance/io-threads/src/io-threads.c b/xlators/performance/io-threads/src/io-threads.c
index 49a515712f5..832291d3a6d 100644
--- a/xlators/performance/io-threads/src/io-threads.c
+++ b/xlators/performance/io-threads/src/io-threads.c
@@ -835,7 +835,7 @@ __iot_workers_scale (iot_conf_t *conf)
diff --;
snprintf (thread_name, sizeof(thread_name),
- "%s%d", "iotwr", conf->curr_count);
+ "iotwr%03hx", (conf->curr_count & 0x3ff));
ret = gf_thread_create (&thread, &conf->w_attr, iot_worker,
conf, thread_name);
if (ret == 0) {