mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-12-26 03:09:34 +03:00
Illumos #4730 destroy metaslab group taskq
4730 metaslab group taskq should be destroyed in metaslab_group_destroy() Reviewed by: Alex Reece <alex.reece@delphix.com> Reviewed by: Matthew Ahrens <mahrens@delphix.com> Reviewed by: Sebastien Roy <sebastien.roy@delphix.com> Reviewed by: Rich Lowe <richlowe@richlowe.net> Reviewed by: Dan McDonald <danmcd@omniti.com> Approved by: Dan McDonald <danmcd@omniti.com> 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 <tim@chase2k.com> Signed-off-by: Prakash Surya <surya1@llnl.gov> Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Closes #2488
This commit is contained in:
parent
93cf20764a
commit
3c51c5cb1f
@ -333,7 +333,7 @@ metaslab_group_create(metaslab_class_t *mc, vdev_t *vd)
|
|||||||
mg->mg_class = mc;
|
mg->mg_class = mc;
|
||||||
mg->mg_activation_count = 0;
|
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);
|
minclsyspri, 10, INT_MAX, TASKQ_THREADS_CPU_PCT);
|
||||||
|
|
||||||
return (mg);
|
return (mg);
|
||||||
@ -351,6 +351,7 @@ metaslab_group_destroy(metaslab_group_t *mg)
|
|||||||
*/
|
*/
|
||||||
ASSERT(mg->mg_activation_count <= 0);
|
ASSERT(mg->mg_activation_count <= 0);
|
||||||
|
|
||||||
|
taskq_destroy(mg->mg_taskq);
|
||||||
avl_destroy(&mg->mg_metaslab_tree);
|
avl_destroy(&mg->mg_metaslab_tree);
|
||||||
mutex_destroy(&mg->mg_lock);
|
mutex_destroy(&mg->mg_lock);
|
||||||
kmem_free(mg, sizeof (metaslab_group_t));
|
kmem_free(mg, sizeof (metaslab_group_t));
|
||||||
|
Loading…
Reference in New Issue
Block a user