Print this page
4101 metaslab_debug should allow for fine-grained control
4102 space_maps should store more information about themselves
4103 space map object blocksize should be increased
4104 ::spa_space no longer works
4105 removing a mirrored log device results in a leaked object
4106 asynchronously load metaslab
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Adam Leventhal <ahl@delphix.com>
Reviewed by: Sebastien Roy <seb@delphix.com>

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/fs/zfs/spa_misc.c
          +++ new/usr/src/uts/common/fs/zfs/spa_misc.c
↓ open down ↓ 449 lines elided ↑ open up ↑
 450  450  /*
 451  451   * Fires when spa_sync has not completed within zfs_deadman_synctime_ms.
 452  452   * If the zfs_deadman_enabled flag is set then it inspects all vdev queues
 453  453   * looking for potentially hung I/Os.
 454  454   */
 455  455  void
 456  456  spa_deadman(void *arg)
 457  457  {
 458  458          spa_t *spa = arg;
 459  459  
      460 +        /*
      461 +         * Disable the deadman timer if the pool is suspended.
      462 +         */
      463 +        if (spa_suspended(spa)) {
      464 +                VERIFY(cyclic_reprogram(spa->spa_deadman_cycid, CY_INFINITY));
      465 +                return;
      466 +        }
      467 +
 460  468          zfs_dbgmsg("slow spa_sync: started %llu seconds ago, calls %llu",
 461  469              (gethrtime() - spa->spa_sync_starttime) / NANOSEC,
 462  470              ++spa->spa_deadman_calls);
 463  471          if (zfs_deadman_enabled)
 464  472                  vdev_deadman(spa->spa_root_vdev);
 465  473  }
 466  474  
 467  475  /*
 468  476   * Create an uninitialized spa_t with the given name.  Requires
 469  477   * spa_namespace_lock.  The caller must ensure that the spa_t doesn't already
↓ open down ↓ 548 lines elided ↑ open up ↑
1018 1026  
1019 1027          /*
1020 1028           * Note: this txg_wait_synced() is important because it ensures
1021 1029           * that there won't be more than one config change per txg.
1022 1030           * This allows us to use the txg as the generation number.
1023 1031           */
1024 1032          if (error == 0)
1025 1033                  txg_wait_synced(spa->spa_dsl_pool, txg);
1026 1034  
1027 1035          if (vd != NULL) {
1028      -                ASSERT(!vd->vdev_detached || vd->vdev_dtl_smo.smo_object == 0);
     1036 +                ASSERT(!vd->vdev_detached || vd->vdev_dtl_sm == NULL);
1029 1037                  spa_config_enter(spa, SCL_ALL, spa, RW_WRITER);
1030 1038                  vdev_free(vd);
1031 1039                  spa_config_exit(spa, SCL_ALL, spa);
1032 1040          }
1033 1041  
1034 1042          /*
1035 1043           * If the config changed, update the config cache.
1036 1044           */
1037 1045          if (config_changed)
1038 1046                  spa_config_sync(spa, B_FALSE, B_TRUE);
↓ open down ↓ 656 lines elided ↑ open up ↑
1695 1703                          perror("could not enable watchpoints: "
1696 1704                              "opening /proc/self/ctl failed: ");
1697 1705                  } else {
1698 1706                          arc_watch = B_TRUE;
1699 1707                  }
1700 1708          }
1701 1709  #endif
1702 1710  
1703 1711          refcount_init();
1704 1712          unique_init();
1705      -        space_map_init();
     1713 +        range_tree_init();
1706 1714          zio_init();
1707 1715          dmu_init();
1708 1716          zil_init();
1709 1717          vdev_cache_stat_init();
1710 1718          zfs_prop_init();
1711 1719          zpool_prop_init();
1712 1720          zpool_feature_init();
1713 1721          spa_config_load();
1714 1722          l2arc_start();
1715 1723  }
↓ open down ↓ 2 lines elided ↑ open up ↑
1718 1726  spa_fini(void)
1719 1727  {
1720 1728          l2arc_stop();
1721 1729  
1722 1730          spa_evict_all();
1723 1731  
1724 1732          vdev_cache_stat_fini();
1725 1733          zil_fini();
1726 1734          dmu_fini();
1727 1735          zio_fini();
1728      -        space_map_fini();
     1736 +        range_tree_fini();
1729 1737          unique_fini();
1730 1738          refcount_fini();
1731 1739  
1732 1740          avl_destroy(&spa_namespace_avl);
1733 1741          avl_destroy(&spa_spare_avl);
1734 1742          avl_destroy(&spa_l2cache_avl);
1735 1743  
1736 1744          cv_destroy(&spa_namespace_cv);
1737 1745          mutex_destroy(&spa_namespace_lock);
1738 1746          mutex_destroy(&spa_spare_lock);
↓ open down ↓ 115 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX