Lines Matching refs:sm

169 	struct dm_space_map sm;  member
276 static void sm_metadata_destroy(struct dm_space_map *sm) in sm_metadata_destroy() argument
278 struct sm_metadata *smm = container_of(sm, struct sm_metadata, sm); in sm_metadata_destroy()
283 static int sm_metadata_get_nr_blocks(struct dm_space_map *sm, dm_block_t *count) in sm_metadata_get_nr_blocks() argument
285 struct sm_metadata *smm = container_of(sm, struct sm_metadata, sm); in sm_metadata_get_nr_blocks()
292 static int sm_metadata_get_nr_free(struct dm_space_map *sm, dm_block_t *count) in sm_metadata_get_nr_free() argument
294 struct sm_metadata *smm = container_of(sm, struct sm_metadata, sm); in sm_metadata_get_nr_free()
302 static int sm_metadata_get_count(struct dm_space_map *sm, dm_block_t b, in sm_metadata_get_count() argument
307 struct sm_metadata *smm = container_of(sm, struct sm_metadata, sm); in sm_metadata_get_count()
342 static int sm_metadata_count_is_more_than_one(struct dm_space_map *sm, in sm_metadata_count_is_more_than_one() argument
347 struct sm_metadata *smm = container_of(sm, struct sm_metadata, sm); in sm_metadata_count_is_more_than_one()
394 static int sm_metadata_set_count(struct dm_space_map *sm, dm_block_t b, in sm_metadata_set_count() argument
399 struct sm_metadata *smm = container_of(sm, struct sm_metadata, sm); in sm_metadata_set_count()
413 static int sm_metadata_inc_blocks(struct dm_space_map *sm, dm_block_t b, dm_block_t e) in sm_metadata_inc_blocks() argument
417 struct sm_metadata *smm = container_of(sm, struct sm_metadata, sm); in sm_metadata_inc_blocks()
432 static int sm_metadata_dec_blocks(struct dm_space_map *sm, dm_block_t b, dm_block_t e) in sm_metadata_dec_blocks() argument
436 struct sm_metadata *smm = container_of(sm, struct sm_metadata, sm); in sm_metadata_dec_blocks()
449 static int sm_metadata_new_block_(struct dm_space_map *sm, dm_block_t *b) in sm_metadata_new_block_() argument
453 struct sm_metadata *smm = container_of(sm, struct sm_metadata, sm); in sm_metadata_new_block_()
486 static int sm_metadata_new_block(struct dm_space_map *sm, dm_block_t *b) in sm_metadata_new_block() argument
489 struct sm_metadata *smm = container_of(sm, struct sm_metadata, sm); in sm_metadata_new_block()
491 int r = sm_metadata_new_block_(sm, b); in sm_metadata_new_block()
498 r = sm_metadata_get_nr_free(sm, &count); in sm_metadata_new_block()
509 static int sm_metadata_commit(struct dm_space_map *sm) in sm_metadata_commit() argument
512 struct sm_metadata *smm = container_of(sm, struct sm_metadata, sm); in sm_metadata_commit()
524 static int sm_metadata_register_threshold_callback(struct dm_space_map *sm, in sm_metadata_register_threshold_callback() argument
529 struct sm_metadata *smm = container_of(sm, struct sm_metadata, sm); in sm_metadata_register_threshold_callback()
536 static int sm_metadata_root_size(struct dm_space_map *sm, size_t *result) in sm_metadata_root_size() argument
543 static int sm_metadata_copy_root(struct dm_space_map *sm, void *where_le, size_t max) in sm_metadata_copy_root() argument
545 struct sm_metadata *smm = container_of(sm, struct sm_metadata, sm); in sm_metadata_copy_root()
561 static int sm_metadata_extend(struct dm_space_map *sm, dm_block_t extra_blocks);
586 static void sm_bootstrap_destroy(struct dm_space_map *sm) in sm_bootstrap_destroy() argument
590 static int sm_bootstrap_extend(struct dm_space_map *sm, dm_block_t extra_blocks) in sm_bootstrap_extend() argument
597 static int sm_bootstrap_get_nr_blocks(struct dm_space_map *sm, dm_block_t *count) in sm_bootstrap_get_nr_blocks() argument
599 struct sm_metadata *smm = container_of(sm, struct sm_metadata, sm); in sm_bootstrap_get_nr_blocks()
606 static int sm_bootstrap_get_nr_free(struct dm_space_map *sm, dm_block_t *count) in sm_bootstrap_get_nr_free() argument
608 struct sm_metadata *smm = container_of(sm, struct sm_metadata, sm); in sm_bootstrap_get_nr_free()
615 static int sm_bootstrap_get_count(struct dm_space_map *sm, dm_block_t b, in sm_bootstrap_get_count() argument
618 struct sm_metadata *smm = container_of(sm, struct sm_metadata, sm); in sm_bootstrap_get_count()
625 static int sm_bootstrap_count_is_more_than_one(struct dm_space_map *sm, in sm_bootstrap_count_is_more_than_one() argument
633 static int sm_bootstrap_set_count(struct dm_space_map *sm, dm_block_t b, in sm_bootstrap_set_count() argument
641 static int sm_bootstrap_new_block(struct dm_space_map *sm, dm_block_t *b) in sm_bootstrap_new_block() argument
643 struct sm_metadata *smm = container_of(sm, struct sm_metadata, sm); in sm_bootstrap_new_block()
656 static int sm_bootstrap_inc_blocks(struct dm_space_map *sm, dm_block_t b, dm_block_t e) in sm_bootstrap_inc_blocks() argument
659 struct sm_metadata *smm = container_of(sm, struct sm_metadata, sm); in sm_bootstrap_inc_blocks()
668 static int sm_bootstrap_dec_blocks(struct dm_space_map *sm, dm_block_t b, dm_block_t e) in sm_bootstrap_dec_blocks() argument
671 struct sm_metadata *smm = container_of(sm, struct sm_metadata, sm); in sm_bootstrap_dec_blocks()
680 static int sm_bootstrap_commit(struct dm_space_map *sm) in sm_bootstrap_commit() argument
685 static int sm_bootstrap_root_size(struct dm_space_map *sm, size_t *result) in sm_bootstrap_root_size() argument
692 static int sm_bootstrap_copy_root(struct dm_space_map *sm, void *where, in sm_bootstrap_copy_root() argument
719 static int sm_metadata_extend(struct dm_space_map *sm, dm_block_t extra_blocks) in sm_metadata_extend() argument
722 struct sm_metadata *smm = container_of(sm, struct sm_metadata, sm); in sm_metadata_extend()
729 memcpy(sm, &bootstrap_ops, sizeof(*sm)); in sm_metadata_extend()
765 memcpy(sm, &ops, sizeof(*sm)); in sm_metadata_extend()
779 memcpy(&smm->sm, &ops, sizeof(smm->sm)); in dm_sm_metadata_init()
781 return &smm->sm; in dm_sm_metadata_init()
784 int dm_sm_metadata_create(struct dm_space_map *sm, in dm_sm_metadata_create() argument
790 struct sm_metadata *smm = container_of(sm, struct sm_metadata, sm); in dm_sm_metadata_create()
798 memcpy(&smm->sm, &bootstrap_ops, sizeof(smm->sm)); in dm_sm_metadata_create()
806 memcpy(&smm->sm, &ops, sizeof(smm->sm)); in dm_sm_metadata_create()
824 return sm_metadata_commit(sm); in dm_sm_metadata_create()
827 int dm_sm_metadata_open(struct dm_space_map *sm, in dm_sm_metadata_open() argument
832 struct sm_metadata *smm = container_of(sm, struct sm_metadata, sm); in dm_sm_metadata_open()