From d3538f3c32a702c4bdcd747d1d44ac49e0da127a Mon Sep 17 00:00:00 2001 From: Dmitry Antipov Date: Mon, 18 May 2020 18:49:19 +0300 Subject: storage/posix: fix thread name to comply with common convention Rename disk space checking thread to comply with common convention, adjust related docs as well. Change-Id: I36d642cf09773a28abd95bbe337ce29134ad96a4 Signed-off-by: Dmitry Antipov Fixes: #1248 --- doc/developer-guide/thread-naming.md | 5 +++-- xlators/storage/posix/src/posix-helpers.c | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/doc/developer-guide/thread-naming.md b/doc/developer-guide/thread-naming.md index 74efba28e45..513140d4437 100644 --- a/doc/developer-guide/thread-naming.md +++ b/doc/developer-guide/thread-naming.md @@ -29,10 +29,10 @@ gf_thread_create_detached (pthread_t *thread, As max name length for a thread in POSIX is only 16 characters including the '\0' character, you have to be a little creative with naming. Also, it is important that all Gluster threads have common prefix. Considering these -conditions, we have "gluster" as prefix for all the threads created by these +conditions, we have "glfs_" as prefix for all the threads created by these wrapper functions. It is responsibility of the owner of thread to provide the suffix part of the name. It does not have to be a descriptive name, as it has -only 8 letters to work with. However, it should be unique enough such that it +only 10 letters to work with. However, it should be unique enough such that it can be matched with a table which describes it. If n number of threads are spwaned to perform same function, it is must that the @@ -87,6 +87,7 @@ such that it can be matched with a table below without ambiguity. - posixfsy - posix fsync - posixhc - posix heal - posixjan - posix janitor +- posixrsv - posix reserve - quiesce - quiesce dequeue - rdmaAsyn - rdma async event handler - rdmaehan - rdma completion handler diff --git a/xlators/storage/posix/src/posix-helpers.c b/xlators/storage/posix/src/posix-helpers.c index b25855bbfbd..513a2f0a2b4 100644 --- a/xlators/storage/posix/src/posix-helpers.c +++ b/xlators/storage/posix/src/posix-helpers.c @@ -2315,7 +2315,7 @@ posix_spawn_disk_space_check_thread(xlator_t *xl) ret = gf_thread_create(&priv->disk_space_check, NULL, posix_disk_space_check_thread_proc, xl, - "posix_reserve"); + "posixrsv"); if (ret) { priv->disk_space_check_active = _gf_false; gf_msg(xl->name, GF_LOG_ERROR, errno, P_MSG_DISK_SPACE_CHECK_FAILED, -- cgit