Lines Matching defs:ms
1307 metaslab_t *ms;
1310 ms = kmem_zalloc(sizeof (metaslab_t), KM_SLEEP);
1311 mutex_init(&ms->ms_lock, NULL, MUTEX_DEFAULT, NULL);
1312 cv_init(&ms->ms_load_cv, NULL, CV_DEFAULT, NULL);
1313 ms->ms_id = id;
1314 ms->ms_start = id << vd->vdev_ms_shift;
1315 ms->ms_size = 1ULL << vd->vdev_ms_shift;
1322 error = space_map_open(&ms->ms_sm, mos, object, ms->ms_start,
1323 ms->ms_size, vd->vdev_ashift, &ms->ms_lock);
1326 kmem_free(ms, sizeof (metaslab_t));
1330 ASSERT(ms->ms_sm != NULL);
1340 ms->ms_tree = range_tree_create(&metaslab_rt_ops, ms, &ms->ms_lock);
1341 metaslab_group_add(mg, ms);
1343 ms->ms_fragmentation = metaslab_fragmentation(ms);
1344 ms->ms_ops = mg->mg_class->mc_ops;
1353 metaslab_sync_done(ms, 0);
1360 if (metaslab_debug_load && ms->ms_sm != NULL) {
1361 mutex_enter(&ms->ms_lock);
1362 VERIFY0(metaslab_load(ms));
1363 mutex_exit(&ms->ms_lock);
1368 vdev_dirty(vd, VDD_METASLAB, ms, txg);
1371 *msp = ms;