summaryrefslogtreecommitdiffstats
path: root/module/zfs/spa.c
diff options
context:
space:
mode:
authorSerapheim Dimitropoulos <[email protected]>2020-07-29 09:43:33 -0700
committerGitHub <[email protected]>2020-07-29 09:43:33 -0700
commit843e9ca2e1ef347cf6b0271ed84438afc145dfd4 (patch)
tree5aed2d7636105945e0ef2799bb066beb206be8a0 /module/zfs/spa.c
parent5678d3f59389a241c8d9c032513c38209bb53e70 (diff)
Introduce names for ZTHRs
When debugging issues or generally analyzing the runtime of a system it would be nice to be able to tell the different ZTHRs running by name rather than having to analyze their stack. Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Matthew Ahrens <[email protected]> Co-authored-by: Ryan Moeller <[email protected]> Signed-off-by: Serapheim Dimitropoulos <[email protected]> Closes #10630
Diffstat (limited to 'module/zfs/spa.c')
-rw-r--r--module/zfs/spa.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/module/zfs/spa.c b/module/zfs/spa.c
index 2783e9e29..86e5d0125 100644
--- a/module/zfs/spa.c
+++ b/module/zfs/spa.c
@@ -2548,7 +2548,8 @@ static void
spa_start_livelist_destroy_thread(spa_t *spa)
{
ASSERT3P(spa->spa_livelist_delete_zthr, ==, NULL);
- spa->spa_livelist_delete_zthr = zthr_create(
+ spa->spa_livelist_delete_zthr =
+ zthr_create("z_livelist_destroy",
spa_livelist_delete_cb_check, spa_livelist_delete_cb, spa);
}
@@ -2755,8 +2756,10 @@ spa_start_livelist_condensing_thread(spa_t *spa)
spa->spa_to_condense.cancelled = B_FALSE;
ASSERT3P(spa->spa_livelist_condense_zthr, ==, NULL);
- spa->spa_livelist_condense_zthr = zthr_create(
- spa_livelist_condense_cb_check, spa_livelist_condense_cb, spa);
+ spa->spa_livelist_condense_zthr =
+ zthr_create("z_livelist_condense",
+ spa_livelist_condense_cb_check,
+ spa_livelist_condense_cb, spa);
}
static void
@@ -2772,7 +2775,8 @@ spa_spawn_aux_threads(spa_t *spa)
ASSERT3P(spa->spa_checkpoint_discard_zthr, ==, NULL);
spa->spa_checkpoint_discard_zthr =
- zthr_create(spa_checkpoint_discard_thread_check,
+ zthr_create("z_checkpoint_discard",
+ spa_checkpoint_discard_thread_check,
spa_checkpoint_discard_thread, spa);
}