From 3c51c5cb1f1c6097ecbfd18aa1177ba0f67c215e Mon Sep 17 00:00:00 2001 From: George Wilson Date: Mon, 19 May 2014 12:04:04 -0800 Subject: Illumos #4730 destroy metaslab group taskq 4730 metaslab group taskq should be destroyed in metaslab_group_destroy() Reviewed by: Alex Reece Reviewed by: Matthew Ahrens Reviewed by: Sebastien Roy Reviewed by: Rich Lowe Reviewed by: Dan McDonald Approved by: Dan McDonald References: https://www.illumos.org/issues/4730 https://github.com/illumos/illumos-gate/commit/be08211 Porting notes: Under ZFSonlinux, one of the effects of not destroying the taskq is that zdb would never exit (due to the SPL taskq implementation). Ported-by: Tim Chase Signed-off-by: Prakash Surya Signed-off-by: Brian Behlendorf Closes #2488 --- module/zfs/metaslab.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'module/zfs') diff --git a/module/zfs/metaslab.c b/module/zfs/metaslab.c index b4e390c98..46543a52b 100644 --- a/module/zfs/metaslab.c +++ b/module/zfs/metaslab.c @@ -333,7 +333,7 @@ metaslab_group_create(metaslab_class_t *mc, vdev_t *vd) mg->mg_class = mc; mg->mg_activation_count = 0; - mg->mg_taskq = taskq_create("metaslab_group_tasksq", metaslab_load_pct, + mg->mg_taskq = taskq_create("metaslab_group_taskq", metaslab_load_pct, minclsyspri, 10, INT_MAX, TASKQ_THREADS_CPU_PCT); return (mg); @@ -351,6 +351,7 @@ metaslab_group_destroy(metaslab_group_t *mg) */ ASSERT(mg->mg_activation_count <= 0); + taskq_destroy(mg->mg_taskq); avl_destroy(&mg->mg_metaslab_tree); mutex_destroy(&mg->mg_lock); kmem_free(mg, sizeof (metaslab_group_t)); -- cgit v1.2.3