Print this page
4730 Destroy the metaslab group taskq in metaslab_group_destroy()

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/fs/zfs/metaslab.c
          +++ new/usr/src/uts/common/fs/zfs/metaslab.c
↓ open down ↓ 339 lines elided ↑ open up ↑
 340  340  {
 341  341          ASSERT(mg->mg_prev == NULL);
 342  342          ASSERT(mg->mg_next == NULL);
 343  343          /*
 344  344           * We may have gone below zero with the activation count
 345  345           * either because we never activated in the first place or
 346  346           * because we're done, and possibly removing the vdev.
 347  347           */
 348  348          ASSERT(mg->mg_activation_count <= 0);
 349  349  
      350 +        if (mg->mg_taskq) taskq_destroy(mg->mg_taskq);
      351 +
 350  352          avl_destroy(&mg->mg_metaslab_tree);
 351  353          mutex_destroy(&mg->mg_lock);
 352  354          kmem_free(mg, sizeof (metaslab_group_t));
 353  355  }
 354  356  
 355  357  void
 356  358  metaslab_group_activate(metaslab_group_t *mg)
 357  359  {
 358  360          metaslab_class_t *mc = mg->mg_class;
 359  361          metaslab_group_t *mgprev, *mgnext;
↓ open down ↓ 1857 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX