Lines Matching refs:sm

20 	void (*destroy)(struct dm_space_map *sm);
25 int (*extend)(struct dm_space_map *sm, dm_block_t extra_blocks);
31 int (*get_nr_blocks)(struct dm_space_map *sm, dm_block_t *count);
41 int (*get_nr_free)(struct dm_space_map *sm, dm_block_t *count);
43 int (*get_count)(struct dm_space_map *sm, dm_block_t b, uint32_t *result);
44 int (*count_is_more_than_one)(struct dm_space_map *sm, dm_block_t b,
46 int (*set_count)(struct dm_space_map *sm, dm_block_t b, uint32_t count);
48 int (*commit)(struct dm_space_map *sm);
50 int (*inc_blocks)(struct dm_space_map *sm, dm_block_t b, dm_block_t e);
51 int (*dec_blocks)(struct dm_space_map *sm, dm_block_t b, dm_block_t e);
56 int (*new_block)(struct dm_space_map *sm, dm_block_t *b);
63 int (*root_size)(struct dm_space_map *sm, size_t *result);
64 int (*copy_root)(struct dm_space_map *sm, void *copy_to_here_le, size_t len);
70 int (*register_threshold_callback)(struct dm_space_map *sm,
78 static inline void dm_sm_destroy(struct dm_space_map *sm) in dm_sm_destroy() argument
80 if (sm) in dm_sm_destroy()
81 sm->destroy(sm); in dm_sm_destroy()
84 static inline int dm_sm_extend(struct dm_space_map *sm, dm_block_t extra_blocks) in dm_sm_extend() argument
86 return sm->extend(sm, extra_blocks); in dm_sm_extend()
89 static inline int dm_sm_get_nr_blocks(struct dm_space_map *sm, dm_block_t *count) in dm_sm_get_nr_blocks() argument
91 return sm->get_nr_blocks(sm, count); in dm_sm_get_nr_blocks()
94 static inline int dm_sm_get_nr_free(struct dm_space_map *sm, dm_block_t *count) in dm_sm_get_nr_free() argument
96 return sm->get_nr_free(sm, count); in dm_sm_get_nr_free()
99 static inline int dm_sm_get_count(struct dm_space_map *sm, dm_block_t b, in dm_sm_get_count() argument
102 return sm->get_count(sm, b, result); in dm_sm_get_count()
105 static inline int dm_sm_count_is_more_than_one(struct dm_space_map *sm, in dm_sm_count_is_more_than_one() argument
108 return sm->count_is_more_than_one(sm, b, result); in dm_sm_count_is_more_than_one()
111 static inline int dm_sm_set_count(struct dm_space_map *sm, dm_block_t b, in dm_sm_set_count() argument
114 return sm->set_count(sm, b, count); in dm_sm_set_count()
117 static inline int dm_sm_commit(struct dm_space_map *sm) in dm_sm_commit() argument
119 return sm->commit(sm); in dm_sm_commit()
122 static inline int dm_sm_inc_blocks(struct dm_space_map *sm, dm_block_t b, dm_block_t e) in dm_sm_inc_blocks() argument
124 return sm->inc_blocks(sm, b, e); in dm_sm_inc_blocks()
127 static inline int dm_sm_inc_block(struct dm_space_map *sm, dm_block_t b) in dm_sm_inc_block() argument
129 return dm_sm_inc_blocks(sm, b, b + 1); in dm_sm_inc_block()
132 static inline int dm_sm_dec_blocks(struct dm_space_map *sm, dm_block_t b, dm_block_t e) in dm_sm_dec_blocks() argument
134 return sm->dec_blocks(sm, b, e); in dm_sm_dec_blocks()
137 static inline int dm_sm_dec_block(struct dm_space_map *sm, dm_block_t b) in dm_sm_dec_block() argument
139 return dm_sm_dec_blocks(sm, b, b + 1); in dm_sm_dec_block()
142 static inline int dm_sm_new_block(struct dm_space_map *sm, dm_block_t *b) in dm_sm_new_block() argument
144 return sm->new_block(sm, b); in dm_sm_new_block()
147 static inline int dm_sm_root_size(struct dm_space_map *sm, size_t *result) in dm_sm_root_size() argument
149 return sm->root_size(sm, result); in dm_sm_root_size()
152 static inline int dm_sm_copy_root(struct dm_space_map *sm, void *copy_to_here_le, size_t len) in dm_sm_copy_root() argument
154 return sm->copy_root(sm, copy_to_here_le, len); in dm_sm_copy_root()
157 static inline int dm_sm_register_threshold_callback(struct dm_space_map *sm, in dm_sm_register_threshold_callback() argument
162 if (sm->register_threshold_callback) in dm_sm_register_threshold_callback()
163 return sm->register_threshold_callback(sm, threshold, fn, context); in dm_sm_register_threshold_callback()