/drivers/md/ |
D | dm-thin-metadata.h | 119 dm_block_t *result); 136 dm_block_t block; 146 int dm_thin_find_block(struct dm_thin_device *td, dm_block_t block, 154 dm_block_t begin, dm_block_t end, 155 dm_block_t *thin_begin, dm_block_t *thin_end, 156 dm_block_t *pool_begin, bool *maybe_shared); 161 int dm_pool_alloc_data_block(struct dm_pool_metadata *pmd, dm_block_t *result); 166 int dm_thin_insert_block(struct dm_thin_device *td, dm_block_t block, 167 dm_block_t data_block); 169 int dm_thin_remove_block(struct dm_thin_device *td, dm_block_t block); [all …]
|
D | dm-cache-block-types.h | 20 typedef dm_block_t __bitwise__ dm_oblock_t; 22 typedef dm_block_t __bitwise__ dm_dblock_t; 24 static inline dm_oblock_t to_oblock(dm_block_t b) in to_oblock() 29 static inline dm_block_t from_oblock(dm_oblock_t b) in from_oblock() 31 return (__force dm_block_t) b; in from_oblock() 44 static inline dm_dblock_t to_dblock(dm_block_t b) in to_dblock() 49 static inline dm_block_t from_dblock(dm_dblock_t b) in from_dblock() 51 return (__force dm_block_t) b; in from_dblock()
|
D | dm-thin-metadata.c | 185 dm_block_t root; 186 dm_block_t details_root; 282 static uint64_t pack_block_time(dm_block_t b, uint32_t t) in pack_block_time() 287 static void unpack_block_time(uint64_t v, dm_block_t *b, uint32_t *t) in unpack_block_time() 980 dm_block_t dev_root; in __create_thin() 1057 dm_block_t origin_root; in __create_snap() 1211 dm_block_t held_root; in __reserve_metadata_snap() 1288 dm_block_t held_root; in __release_metadata_snap() 1332 dm_block_t *result) in __get_metadata_snap() 1352 dm_block_t *result) in dm_pool_get_metadata_snap() [all …]
|
D | dm-era-target.c | 29 dm_block_t root; 52 unsigned nr_bits, dm_block_t *root) in setup_on_disk_bitset() 71 static int writeset_alloc(struct writeset *ws, dm_block_t nr_blocks) in writeset_alloc() 102 static bool writeset_marked(struct writeset *ws, dm_block_t block) in writeset_marked() 108 struct writeset_metadata *m, dm_block_t block, in writeset_marked_on_disk() 111 dm_block_t old = m->root; in writeset_marked_on_disk() 266 dm_block_t block_size; 279 dm_block_t writeset_tree_root; 280 dm_block_t era_array_root; 286 dm_block_t metadata_snap; [all …]
|
D | dm-thin.c | 121 dm_block_t b, dm_block_t e, struct dm_cell_key *key) in build_key() 129 static void build_data_key(struct dm_thin_device *td, dm_block_t b, in build_data_key() 135 static void build_virtual_key(struct dm_thin_device *td, dm_block_t b, in build_virtual_key() 231 dm_block_t low_water_blocks; 291 dm_block_t low_water_blocks; 332 static sector_t block_to_sectors(struct pool *pool, dm_block_t b) in block_to_sectors() 358 static int issue_discard(struct discard_op *op, dm_block_t data_b, dm_block_t data_e) in issue_discard() 639 static dm_block_t get_bio_block(struct thin_c *tc, struct bio *bio) in get_bio_block() 656 dm_block_t *begin, dm_block_t *end) in get_bio_block_range() 680 static void remap(struct thin_c *tc, struct bio *bio, dm_block_t block) in remap() [all …]
|
D | dm-cache-metadata.h | 115 dm_block_t *result); 118 dm_block_t *result);
|
/drivers/md/persistent-data/ |
D | dm-space-map.h | 24 int (*extend)(struct dm_space_map *sm, dm_block_t extra_blocks); 30 int (*get_nr_blocks)(struct dm_space_map *sm, dm_block_t *count); 40 int (*get_nr_free)(struct dm_space_map *sm, dm_block_t *count); 42 int (*get_count)(struct dm_space_map *sm, dm_block_t b, uint32_t *result); 43 int (*count_is_more_than_one)(struct dm_space_map *sm, dm_block_t b, 45 int (*set_count)(struct dm_space_map *sm, dm_block_t b, uint32_t count); 49 int (*inc_block)(struct dm_space_map *sm, dm_block_t b); 50 int (*dec_block)(struct dm_space_map *sm, dm_block_t b); 55 int (*new_block)(struct dm_space_map *sm, dm_block_t *b); 70 dm_block_t threshold, [all …]
|
D | dm-btree.h | 94 int dm_btree_empty(struct dm_btree_info *info, dm_block_t *root); 100 int dm_btree_del(struct dm_btree_info *info, dm_block_t root); 109 int dm_btree_lookup(struct dm_btree_info *info, dm_block_t root, 116 int dm_btree_lookup_next(struct dm_btree_info *info, dm_block_t root, 122 int dm_btree_insert(struct dm_btree_info *info, dm_block_t root, 123 uint64_t *keys, void *value, dm_block_t *new_root) 131 int dm_btree_insert_notify(struct dm_btree_info *info, dm_block_t root, 132 uint64_t *keys, void *value, dm_block_t *new_root, 141 int dm_btree_remove(struct dm_btree_info *info, dm_block_t root, 142 uint64_t *keys, dm_block_t *new_root); [all …]
|
D | dm-space-map-common.h | 50 typedef int (*load_ie_fn)(struct ll_disk *ll, dm_block_t index, struct disk_index_entry *result); 51 typedef int (*save_ie_fn)(struct ll_disk *ll, dm_block_t index, struct disk_index_entry *ie); 54 typedef dm_block_t (*max_index_entries_fn)(struct ll_disk *ll); 64 dm_block_t nr_blocks; 65 dm_block_t nr_allocated; 70 dm_block_t bitmap_root; 72 dm_block_t ref_count_root; 107 int sm_ll_extend(struct ll_disk *ll, dm_block_t extra_blocks); 108 int sm_ll_lookup_bitmap(struct ll_disk *ll, dm_block_t b, uint32_t *result); 109 int sm_ll_lookup(struct ll_disk *ll, dm_block_t b, uint32_t *result); [all …]
|
D | dm-bitset.h | 93 int dm_bitset_empty(struct dm_disk_bitset *info, dm_block_t *new_root); 105 int dm_bitset_resize(struct dm_disk_bitset *info, dm_block_t old_root, 107 bool default_value, dm_block_t *new_root); 112 int dm_bitset_del(struct dm_disk_bitset *info, dm_block_t root); 124 int dm_bitset_set_bit(struct dm_disk_bitset *info, dm_block_t root, 125 uint32_t index, dm_block_t *new_root); 137 int dm_bitset_clear_bit(struct dm_disk_bitset *info, dm_block_t root, 138 uint32_t index, dm_block_t *new_root); 151 int dm_bitset_test_bit(struct dm_disk_bitset *info, dm_block_t root, 152 uint32_t index, dm_block_t *new_root, bool *result); [all …]
|
D | dm-bitset.c | 36 int dm_bitset_empty(struct dm_disk_bitset *info, dm_block_t *root) in dm_bitset_empty() 42 int dm_bitset_resize(struct dm_disk_bitset *info, dm_block_t root, in dm_bitset_resize() 44 bool default_value, dm_block_t *new_root) in dm_bitset_resize() 56 int dm_bitset_del(struct dm_disk_bitset *info, dm_block_t root) in dm_bitset_del() 62 int dm_bitset_flush(struct dm_disk_bitset *info, dm_block_t root, in dm_bitset_flush() 63 dm_block_t *new_root) in dm_bitset_flush() 86 static int read_bits(struct dm_disk_bitset *info, dm_block_t root, in read_bits() 104 static int get_array_entry(struct dm_disk_bitset *info, dm_block_t root, in get_array_entry() 105 uint32_t index, dm_block_t *new_root) in get_array_entry() 122 int dm_bitset_set_bit(struct dm_disk_bitset *info, dm_block_t root, in dm_bitset_set_bit() [all …]
|
D | dm-space-map-metadata.c | 25 dm_block_t threshold; 26 dm_block_t current_value; 37 static void set_threshold(struct threshold *t, dm_block_t value, in set_threshold() 46 static bool below_threshold(struct threshold *t, dm_block_t value) in below_threshold() 56 static void check_threshold(struct threshold *t, dm_block_t value) in check_threshold() 91 dm_block_t block; 118 enum block_op_type type, dm_block_t b) in brb_push() 171 dm_block_t begin; 180 static int add_bop(struct sm_metadata *smm, enum block_op_type type, dm_block_t b) in add_bop() 280 static int sm_metadata_get_nr_blocks(struct dm_space_map *sm, dm_block_t *count) in sm_metadata_get_nr_blocks() [all …]
|
D | dm-array.h | 92 int dm_array_empty(struct dm_array_info *info, dm_block_t *root); 109 int dm_array_resize(struct dm_array_info *info, dm_block_t root, 111 const void *value, dm_block_t *new_root) 130 int dm_array_new(struct dm_array_info *info, dm_block_t *root, 137 int dm_array_del(struct dm_array_info *info, dm_block_t root); 149 int dm_array_get_value(struct dm_array_info *info, dm_block_t root, 167 int dm_array_set_value(struct dm_array_info *info, dm_block_t root, 168 uint32_t index, const void *value, dm_block_t *new_root) 179 int dm_array_walk(struct dm_array_info *info, dm_block_t root, 205 dm_block_t root, struct dm_array_cursor *c);
|
D | dm-block-manager.h | 18 typedef uint64_t dm_block_t; typedef 21 dm_block_t dm_block_location(struct dm_block *b); 40 dm_block_t dm_bm_nr_blocks(struct dm_block_manager *bm); 73 int dm_bm_read_lock(struct dm_block_manager *bm, dm_block_t b, 77 int dm_bm_write_lock(struct dm_block_manager *bm, dm_block_t b, 85 int dm_bm_read_try_lock(struct dm_block_manager *bm, dm_block_t b, 93 int dm_bm_write_lock_zero(struct dm_block_manager *bm, dm_block_t b, 113 void dm_bm_prefetch(struct dm_block_manager *bm, dm_block_t b);
|
D | dm-transaction-manager.c | 24 #define PREFETCH_SENTINEL ((dm_block_t) -1ULL) 28 dm_block_t blocks[PREFETCH_SIZE]; 31 static unsigned prefetch_hash(dm_block_t b) in prefetch_hash() 49 static void prefetch_add(struct prefetch_set *p, dm_block_t b) in prefetch_add() 79 dm_block_t where; 103 static int is_shadow(struct dm_transaction_manager *tm, dm_block_t b) in is_shadow() 124 static void insert_shadow(struct dm_transaction_manager *tm, dm_block_t b) in insert_shadow() 239 dm_block_t new_block; in dm_tm_new_block() 263 static int __shadow_block(struct dm_transaction_manager *tm, dm_block_t orig, in __shadow_block() 268 dm_block_t new; in __shadow_block() [all …]
|
D | dm-transaction-manager.h | 85 int dm_tm_shadow_block(struct dm_transaction_manager *tm, dm_block_t orig, 93 int dm_tm_read_lock(struct dm_transaction_manager *tm, dm_block_t b, 102 void dm_tm_inc(struct dm_transaction_manager *tm, dm_block_t b); 104 void dm_tm_dec(struct dm_transaction_manager *tm, dm_block_t b); 106 int dm_tm_ref(struct dm_transaction_manager *tm, dm_block_t b, 128 int dm_tm_create_with_sm(struct dm_block_manager *bm, dm_block_t sb_location, 132 int dm_tm_open_with_sm(struct dm_block_manager *bm, dm_block_t sb_location,
|
D | dm-space-map-disk.c | 30 dm_block_t begin; 31 dm_block_t nr_allocated_this_transaction; 41 static int sm_disk_extend(struct dm_space_map *sm, dm_block_t extra_blocks) in sm_disk_extend() 48 static int sm_disk_get_nr_blocks(struct dm_space_map *sm, dm_block_t *count) in sm_disk_get_nr_blocks() 56 static int sm_disk_get_nr_free(struct dm_space_map *sm, dm_block_t *count) in sm_disk_get_nr_free() 64 static int sm_disk_get_count(struct dm_space_map *sm, dm_block_t b, in sm_disk_get_count() 71 static int sm_disk_count_is_more_than_one(struct dm_space_map *sm, dm_block_t b, in sm_disk_count_is_more_than_one() 86 static int sm_disk_set_count(struct dm_space_map *sm, dm_block_t b, in sm_disk_set_count() 126 static int sm_disk_inc_block(struct dm_space_map *sm, dm_block_t b) in sm_disk_inc_block() 143 static int sm_disk_dec_block(struct dm_space_map *sm, dm_block_t b) in sm_disk_dec_block() [all …]
|
D | dm-space-map-common.c | 232 int sm_ll_extend(struct ll_disk *ll, dm_block_t extra_blocks) in sm_ll_extend() 235 dm_block_t i, nr_blocks, nr_indexes; in sm_ll_extend() 275 int sm_ll_lookup_bitmap(struct ll_disk *ll, dm_block_t b, uint32_t *result) in sm_ll_lookup_bitmap() 278 dm_block_t index = b; in sm_ll_lookup_bitmap() 299 static int sm_ll_lookup_big_ref_count(struct ll_disk *ll, dm_block_t b, in sm_ll_lookup_big_ref_count() 314 int sm_ll_lookup(struct ll_disk *ll, dm_block_t b, uint32_t *result) in sm_ll_lookup() 327 int sm_ll_find_free_block(struct ll_disk *ll, dm_block_t begin, in sm_ll_find_free_block() 328 dm_block_t end, dm_block_t *result) in sm_ll_find_free_block() 332 dm_block_t i, index_begin = begin; in sm_ll_find_free_block() 333 dm_block_t index_end = dm_sector_div_up(end, ll->entries_per_block); in sm_ll_find_free_block() [all …]
|
D | dm-array.c | 220 static int get_ablock(struct dm_array_info *info, dm_block_t b, in get_ablock() 253 static int lookup_ablock(struct dm_array_info *info, dm_block_t root, in lookup_ablock() 272 struct dm_block *block, dm_block_t *root) in insert_ablock() 282 static int __shadow_ablock(struct dm_array_info *info, dm_block_t b, in __shadow_ablock() 303 struct dm_block *block, dm_block_t b, in __reinsert_ablock() 304 dm_block_t *root) in __reinsert_ablock() 327 static int shadow_ablock(struct dm_array_info *info, dm_block_t *root, in shadow_ablock() 333 dm_block_t b; in shadow_ablock() 354 const void *value, dm_block_t *root) in insert_new_ablock() 374 dm_block_t *root) in insert_full_ablocks() [all …]
|
D | dm-btree.c | 126 int dm_btree_empty(struct dm_btree_info *info, dm_block_t *root) in dm_btree_empty() 208 static int push_frame(struct del_stack *s, dm_block_t b, unsigned level) in push_frame() 270 int dm_btree_del(struct dm_btree_info *info, dm_block_t root) in dm_btree_del() 289 dm_block_t b; in dm_btree_del() 339 static int btree_lookup_raw(struct ro_spine *s, dm_block_t block, uint64_t key, in btree_lookup_raw() 369 int dm_btree_lookup(struct dm_btree_info *info, dm_block_t root, in dm_btree_lookup() 414 static int dm_btree_lookup_next_single(struct dm_btree_info *info, dm_block_t root, in dm_btree_lookup_next_single() 465 int dm_btree_lookup_next(struct dm_btree_info *info, dm_block_t root, in dm_btree_lookup_next() 686 static int btree_insert_raw(struct shadow_spine *s, dm_block_t root, in btree_insert_raw() 756 static int insert(struct dm_btree_info *info, dm_block_t root, in insert() [all …]
|
D | dm-btree-internal.h | 48 int bn_read_lock(struct dm_btree_info *info, dm_block_t b, 72 int ro_step(struct ro_spine *s, dm_block_t new_child); 82 dm_block_t root; 88 int shadow_step(struct shadow_spine *s, dm_block_t b,
|
D | dm-block-manager.c | 298 static void report_recursive_bug(dm_block_t b, int r) in report_recursive_bug() 319 dm_block_t dm_block_location(struct dm_block *b) in dm_block_location() 407 dm_block_t dm_bm_nr_blocks(struct dm_block_manager *bm) in dm_bm_nr_blocks() 439 int dm_bm_read_lock(struct dm_block_manager *bm, dm_block_t b, in dm_bm_read_lock() 473 dm_block_t b, struct dm_block_validator *v, in dm_bm_write_lock() 509 dm_block_t b, struct dm_block_validator *v, in dm_bm_read_try_lock() 542 dm_block_t b, struct dm_block_validator *v, in dm_bm_write_lock_zero() 596 void dm_bm_prefetch(struct dm_block_manager *bm, dm_block_t b) in dm_bm_prefetch()
|
D | dm-btree-remove.c | 147 dm_block_t root; in init_child() 412 dm_block_t b = value64(n, 0); in rebalance_children() 464 struct dm_btree_value_type *vt, dm_block_t root, in remove_raw() 512 int dm_btree_remove(struct dm_btree_info *info, dm_block_t root, in dm_btree_remove() 513 uint64_t *keys, dm_block_t *new_root) in dm_btree_remove() 556 struct dm_btree_value_type *vt, dm_block_t root, in remove_nearest() 608 static int remove_one(struct dm_btree_info *info, dm_block_t root, in remove_one() 610 dm_block_t *new_root, unsigned *nr_removed) in remove_one() 665 int dm_btree_remove_leaves(struct dm_btree_info *info, dm_block_t root, in dm_btree_remove_leaves() 667 dm_block_t *new_root, unsigned *nr_removed) in dm_btree_remove_leaves()
|
D | dm-space-map-metadata.h | 34 dm_block_t nr_blocks, 35 dm_block_t superblock);
|
D | dm-btree-spine.c | 95 int bn_read_lock(struct dm_btree_info *info, dm_block_t b, in bn_read_lock() 101 static int bn_shadow(struct dm_btree_info *info, dm_block_t orig, in bn_shadow() 146 int ro_step(struct ro_spine *s, dm_block_t new_child) in ro_step() 199 int shadow_step(struct shadow_spine *s, dm_block_t b, in shadow_step()
|