Lines Matching refs:sm
95 struct dm_space_map *sm; member
163 struct dm_space_map *sm) in dm_tm_create() argument
175 tm->sm = sm; in dm_tm_create()
219 r = dm_sm_commit(tm->sm); in dm_tm_pre_commit()
249 r = dm_sm_new_block(tm->sm, &new_block); in dm_tm_new_block()
255 dm_sm_dec_block(tm->sm, new_block); in dm_tm_new_block()
276 r = dm_sm_new_block(tm->sm, &new); in __shadow_block()
280 r = dm_sm_dec_block(tm->sm, orig); in __shadow_block()
317 r = dm_sm_count_is_more_than_one(tm->sm, orig, inc_children); in dm_tm_shadow_block()
363 dm_sm_inc_block(tm->sm, b); in dm_tm_inc()
374 dm_sm_inc_blocks(tm->sm, b, e); in dm_tm_inc_range()
385 dm_sm_dec_block(tm->sm, b); in dm_tm_dec()
396 dm_sm_dec_blocks(tm->sm, b, e); in dm_tm_dec_range()
436 return dm_sm_get_count(tm->sm, b, result); in dm_tm_ref()
445 return dm_sm_count_is_more_than_one(tm->sm, b, result); in dm_tm_block_is_shared()
464 struct dm_space_map **sm, in dm_tm_create_internal() argument
470 *sm = dm_sm_metadata_init(); in dm_tm_create_internal()
471 if (IS_ERR(*sm)) in dm_tm_create_internal()
472 return PTR_ERR(*sm); in dm_tm_create_internal()
474 *tm = dm_tm_create(bm, *sm); in dm_tm_create_internal()
476 dm_sm_destroy(*sm); in dm_tm_create_internal()
481 r = dm_sm_metadata_create(*sm, *tm, dm_bm_nr_blocks(bm), in dm_tm_create_internal()
489 r = dm_sm_metadata_open(*sm, *tm, sm_root, sm_len); in dm_tm_create_internal()
500 dm_sm_destroy(*sm); in dm_tm_create_internal()
506 struct dm_space_map **sm) in dm_tm_create_with_sm() argument
508 return dm_tm_create_internal(bm, sb_location, tm, sm, 1, NULL, 0); in dm_tm_create_with_sm()
515 struct dm_space_map **sm) in dm_tm_open_with_sm() argument
517 return dm_tm_create_internal(bm, sb_location, tm, sm, 0, sm_root, root_len); in dm_tm_open_with_sm()