Lines Matching refs:ms_sm

1260 		if (msp->ms_sm == NULL)  in metaslab_group_histogram_verify()
1265 msp->ms_sm->sm_phys->smp_histogram[i]; in metaslab_group_histogram_verify()
1284 if (msp->ms_sm == NULL) in metaslab_group_histogram_add()
1293 msp->ms_sm->sm_phys->smp_histogram[i]; in metaslab_group_histogram_add()
1295 msp->ms_sm->sm_phys->smp_histogram[i]; in metaslab_group_histogram_add()
1308 if (msp->ms_sm == NULL) in metaslab_group_histogram_remove()
1315 msp->ms_sm->sm_phys->smp_histogram[i]); in metaslab_group_histogram_remove()
1317 msp->ms_sm->sm_phys->smp_histogram[i]); in metaslab_group_histogram_remove()
1322 msp->ms_sm->sm_phys->smp_histogram[i]; in metaslab_group_histogram_remove()
1324 msp->ms_sm->sm_phys->smp_histogram[i]; in metaslab_group_histogram_remove()
2112 if (txg != spa_syncing_txg(spa) || msp->ms_sm == NULL || in metaslab_verify_space()
2121 ASSERT3S(space_map_allocated(msp->ms_sm), >=, 0); in metaslab_verify_space()
2123 ASSERT3U(space_map_allocated(msp->ms_sm), >=, in metaslab_verify_space()
2127 space_map_allocated(msp->ms_sm) + in metaslab_verify_space()
2206 space_map_t *sm = msp->ms_sm; in metaslab_aux_histograms_update()
2240 space_map_t *sm = msp->ms_sm; in metaslab_aux_histograms_update_done()
2321 VERIFY(space_map_histogram_verify(msp->ms_sm, in metaslab_verify_weight_and_frag()
2434 if (msp->ms_allocator == -1 && msp->ms_sm != NULL && in metaslab_potentially_evict()
2496 if (msp->ms_sm != NULL) { in metaslab_load_impl()
2497 error = space_map_load_length(msp->ms_sm, msp->ms_allocatable, in metaslab_load_impl()
2653 (u_longlong_t)space_map_length(msp->ms_sm), in metaslab_load_impl()
2882 error = space_map_open(&ms->ms_sm, mos, object, ms->ms_start, in metaslab_init()
2890 ASSERT(ms->ms_sm != NULL); in metaslab_init()
2891 ms->ms_allocated_space = space_map_allocated(ms->ms_sm); in metaslab_init()
3004 space_map_close(msp->ms_sm); in metaslab_fini()
3005 msp->ms_sm = NULL; in metaslab_fini()
3116 if (msp->ms_sm == NULL) { in metaslab_set_fragmentation()
3125 if (msp->ms_sm->sm_dbuf->db_size != sizeof (space_map_phys_t)) { in metaslab_set_fragmentation()
3152 uint8_t shift = msp->ms_sm->sm_shift; in metaslab_set_fragmentation()
3157 if (msp->ms_sm->sm_phys->smp_histogram[i] == 0) in metaslab_set_fragmentation()
3160 space = msp->ms_sm->sm_phys->smp_histogram[i] << (i + shift); in metaslab_set_fragmentation()
3295 space_map_t *sm = msp->ms_sm; in metaslab_weight_from_spacemap()
3367 ASSERT3U(msp->ms_sm->sm_dbuf->db_size, ==, sizeof (space_map_phys_t)); in metaslab_segment_weight()
3479 (msp->ms_sm == NULL || msp->ms_sm->sm_dbuf->db_size == in metaslab_weight()
3789 space_map_t *sm = msp->ms_sm; in metaslab_should_condense()
3827 space_map_t *sm = msp->ms_sm; in metaslab_condense()
3833 ASSERT(msp->ms_sm != NULL); in metaslab_condense()
3884 spa->spa_name, (u_longlong_t)space_map_length(msp->ms_sm), in metaslab_condense()
3925 uint64_t object = space_map_object(msp->ms_sm); in metaslab_condense()
3934 if (space_map_object(msp->ms_sm) != object) { in metaslab_condense()
3935 object = space_map_object(msp->ms_sm); in metaslab_condense()
3974 ASSERT(msp->ms_sm != NULL); in metaslab_unflushed_add()
3993 ASSERT(msp->ms_sm != NULL); in metaslab_unflushed_bump()
4045 msp->ms_synced_length = space_map_length(msp->ms_sm); in metaslab_flush_update()
4067 ASSERT(msp->ms_sm != NULL); in metaslab_flush()
4115 space_map_histogram_clear(msp->ms_sm); in metaslab_flush()
4116 space_map_histogram_add(msp->ms_sm, msp->ms_allocatable, tx); in metaslab_flush()
4119 space_map_histogram_add(msp->ms_sm, in metaslab_flush()
4142 uint64_t sm_len_before = space_map_length(msp->ms_sm); in metaslab_flush()
4145 space_map_write(msp->ms_sm, msp->ms_unflushed_allocs, SM_ALLOC, in metaslab_flush()
4147 space_map_write(msp->ms_sm, msp->ms_unflushed_frees, SM_FREE, in metaslab_flush()
4151 uint64_t sm_len_after = space_map_length(msp->ms_sm); in metaslab_flush()
4254 if (msp->ms_sm == NULL) { in metaslab_sync()
4264 VERIFY0(space_map_open(&msp->ms_sm, mos, new_object, in metaslab_sync()
4266 ASSERT(msp->ms_sm != NULL); in metaslab_sync()
4344 space_map_write(msp->ms_sm, alloctree, SM_ALLOC, in metaslab_sync()
4346 space_map_write(msp->ms_sm, msp->ms_freeing, SM_FREE, in metaslab_sync()
4388 space_map_histogram_clear(msp->ms_sm); in metaslab_sync()
4389 space_map_histogram_add(msp->ms_sm, msp->ms_allocatable, tx); in metaslab_sync()
4398 space_map_histogram_add(msp->ms_sm, msp->ms_freed, tx); in metaslab_sync()
4408 space_map_histogram_add(msp->ms_sm, in metaslab_sync()
4420 space_map_histogram_add(msp->ms_sm, msp->ms_freeing, tx); in metaslab_sync()
4462 VERIFY3U(object, ==, space_map_object(msp->ms_sm)); in metaslab_sync()
4585 msp->ms_synced_length = space_map_length(msp->ms_sm); in metaslab_sync_done()