/*
* Metaslab debugging: when set, keeps all space maps in core to verify frees.
*/
-static int metaslab_debug = 0;
+int metaslab_debug = 0;
/*
* Minimum size which forces the dynamic allocator to change
for (t = 0; t < TXG_DEFER_SIZE; t++)
space_map_destroy(&msp->ms_defermap[t]);
- ASSERT3S(msp->ms_deferspace, ==, 0);
+ ASSERT0(msp->ms_deferspace);
mutex_exit(&msp->ms_lock);
mutex_destroy(&msp->ms_lock);
if ((msp->ms_weight & METASLAB_ACTIVE_MASK) == 0) {
space_map_load_wait(sm);
if (!sm->sm_loaded) {
- int error = space_map_load(sm, sm_ops, SM_FREE,
- &msp->ms_smo,
+ space_map_obj_t *smo = &msp->ms_smo;
+
+ int error = space_map_load(sm, sm_ops, SM_FREE, smo,
spa_meta_objset(msp->ms_group->mg_vd->vdev_spa));
if (error) {
metaslab_group_sort(msp->ms_group, msp, 0);
spa_config_exit(spa, SCL_VDEV, FTAG);
}
+
+#if defined(_KERNEL) && defined(HAVE_SPL)
+module_param(metaslab_debug, int, 0644);
+MODULE_PARM_DESC(metaslab_debug, "keep space maps in core to verify frees");
+#endif /* _KERNEL && HAVE_SPL */