Skip to content

Commit

Permalink
4730 metaslab group taskq should be destroyed in metaslab_group_destr…
Browse files Browse the repository at this point in the history
…oy()

Reviewed by: Alex Reece <[email protected]>
Reviewed by: Matthew Ahrens <[email protected]>
Reviewed by: Sebastien Roy <[email protected]>
Reviewed by: Rich Lowe <[email protected]>
Reviewed by: Dan McDonald <[email protected]>
Approved by: Dan McDonald <[email protected]>
  • Loading branch information
George Wilson authored and Christopher Siden committed May 19, 2014
1 parent a65cd51 commit be08211
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion usr/src/uts/common/fs/zfs/metaslab.c
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,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);
Expand All @@ -339,6 +339,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));
Expand Down

0 comments on commit be08211

Please sign in to comment.