/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); 170 dm_block_t begin, dm_block_t end); [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 | 184 dm_block_t root; 185 dm_block_t details_root; 204 dm_block_t metadata_reserve; 303 static uint64_t pack_block_time(dm_block_t b, uint32_t t) in pack_block_time() 308 static void unpack_block_time(uint64_t v, dm_block_t *b, uint32_t *t) in unpack_block_time() 319 typedef int (*run_fn)(struct dm_space_map *, dm_block_t, dm_block_t); 936 dm_block_t total; in __set_metadata_reserve() 937 dm_block_t max_blocks = 4096; /* 16M */ in __set_metadata_reserve() 1102 dm_block_t dev_root; in __create_thin() 1178 dm_block_t origin_root; in __create_snap() [all …]
|
D | dm-era-target.c | 30 dm_block_t root; 54 unsigned int nr_bits, dm_block_t *root) in setup_on_disk_bitset() 73 static int writeset_alloc(struct writeset *ws, dm_block_t nr_blocks) in writeset_alloc() 88 dm_block_t nr_blocks) in writeset_init() 104 static bool writeset_marked(struct writeset *ws, dm_block_t block) in writeset_marked() 110 struct writeset_metadata *m, dm_block_t block, in writeset_marked_on_disk() 113 dm_block_t old = m->root; in writeset_marked_on_disk() 267 dm_block_t block_size; 280 dm_block_t writeset_tree_root; 281 dm_block_t era_array_root; [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() 238 dm_block_t low_water_blocks; 328 dm_block_t low_water_blocks; 369 static sector_t block_to_sectors(struct pool *pool, dm_block_t b) in block_to_sectors() 395 static int issue_discard(struct discard_op *op, dm_block_t data_b, dm_block_t data_e) in issue_discard() 674 static dm_block_t get_bio_block(struct thin_c *tc, struct bio *bio) in get_bio_block() 691 dm_block_t *begin, dm_block_t *end) in get_bio_block_range() 715 static void remap(struct thin_c *tc, struct bio *bio, dm_block_t block) in remap() [all …]
|
D | dm-clone-metadata.h | 170 int dm_clone_get_free_metadata_block_count(struct dm_clone_metadata *cmd, dm_block_t *result); 175 int dm_clone_get_metadata_dev_size(struct dm_clone_metadata *cmd, 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_blocks)(struct dm_space_map *sm, dm_block_t b, dm_block_t e); 50 int (*dec_blocks)(struct dm_space_map *sm, dm_block_t b, dm_block_t e); 55 int (*new_block)(struct dm_space_map *sm, dm_block_t *b); 70 dm_block_t threshold, [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); 67 dm_block_t index; 78 dm_block_t nr_blocks; 79 dm_block_t nr_allocated; 84 dm_block_t bitmap_root; 86 dm_block_t ref_count_root; 117 int sm_ll_extend(struct ll_disk *ll, dm_block_t extra_blocks); 118 int sm_ll_lookup_bitmap(struct ll_disk *ll, dm_block_t b, uint32_t *result); [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-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); 103 void dm_tm_inc_range(struct dm_transaction_manager *tm, dm_block_t b, dm_block_t e); 104 void dm_tm_dec(struct dm_transaction_manager *tm, dm_block_t b); 105 void dm_tm_dec_range(struct dm_transaction_manager *tm, dm_block_t b, dm_block_t e); 112 typedef void (*dm_tm_run_fn)(struct dm_transaction_manager *, dm_block_t, dm_block_t); 116 int dm_tm_ref(struct dm_transaction_manager *tm, dm_block_t b, uint32_t *result); 122 int dm_tm_block_is_shared(struct dm_transaction_manager *tm, dm_block_t b, 144 int dm_tm_create_with_sm(struct dm_block_manager *bm, dm_block_t sb_location, [all …]
|
D | dm-bitset.h | 93 int dm_bitset_empty(struct dm_disk_bitset *info, dm_block_t *new_root); 108 int dm_bitset_new(struct dm_disk_bitset *info, dm_block_t *root, 121 int dm_bitset_resize(struct dm_disk_bitset *info, dm_block_t old_root, 123 bool default_value, dm_block_t *new_root); 128 int dm_bitset_del(struct dm_disk_bitset *info, dm_block_t root); 140 int dm_bitset_set_bit(struct dm_disk_bitset *info, dm_block_t root, 141 uint32_t index, dm_block_t *new_root); 153 int dm_bitset_clear_bit(struct dm_disk_bitset *info, dm_block_t root, 154 uint32_t index, dm_block_t *new_root); 167 int dm_bitset_test_bit(struct dm_disk_bitset *info, dm_block_t root, [all …]
|
D | dm-space-map-metadata.c | 26 dm_block_t threshold; 27 dm_block_t current_value; 38 static void set_threshold(struct threshold *t, dm_block_t value, in set_threshold() 47 static bool below_threshold(struct threshold *t, dm_block_t value) in below_threshold() 57 static void check_threshold(struct threshold *t, dm_block_t value) in check_threshold() 92 dm_block_t b; 93 dm_block_t e; 120 enum block_op_type type, dm_block_t b, dm_block_t e) in brb_push() 172 dm_block_t begin; 181 static int add_bop(struct sm_metadata *smm, enum block_op_type type, dm_block_t b, dm_block_t e) in add_bop() [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-transaction-manager.c | 24 #define PREFETCH_SENTINEL ((dm_block_t) -1ULL) 28 dm_block_t blocks[PREFETCH_SIZE]; 31 static unsigned int 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() 242 dm_block_t new_block; in dm_tm_new_block() 266 static int __shadow_block(struct dm_transaction_manager *tm, dm_block_t orig, in __shadow_block() 271 dm_block_t new; in __shadow_block() [all …]
|
D | dm-bitset.c | 36 int dm_bitset_empty(struct dm_disk_bitset *info, dm_block_t *root) in dm_bitset_empty() 72 int dm_bitset_new(struct dm_disk_bitset *info, dm_block_t *root, in dm_bitset_new() 84 int dm_bitset_resize(struct dm_disk_bitset *info, dm_block_t root, in dm_bitset_resize() 86 bool default_value, dm_block_t *new_root) in dm_bitset_resize() 98 int dm_bitset_del(struct dm_disk_bitset *info, dm_block_t root) in dm_bitset_del() 104 int dm_bitset_flush(struct dm_disk_bitset *info, dm_block_t root, in dm_bitset_flush() 105 dm_block_t *new_root) in dm_bitset_flush() 128 static int read_bits(struct dm_disk_bitset *info, dm_block_t root, in read_bits() 146 static int get_array_entry(struct dm_disk_bitset *info, dm_block_t root, in get_array_entry() 147 uint32_t index, dm_block_t *new_root) in get_array_entry() [all …]
|
D | dm-space-map-common.c | 236 int sm_ll_extend(struct ll_disk *ll, dm_block_t extra_blocks) in sm_ll_extend() 239 dm_block_t i, nr_blocks, nr_indexes; in sm_ll_extend() 279 int sm_ll_lookup_bitmap(struct ll_disk *ll, dm_block_t b, uint32_t *result) in sm_ll_lookup_bitmap() 282 dm_block_t index = b; in sm_ll_lookup_bitmap() 308 static int sm_ll_lookup_big_ref_count(struct ll_disk *ll, dm_block_t b, in sm_ll_lookup_big_ref_count() 323 int sm_ll_lookup(struct ll_disk *ll, dm_block_t b, uint32_t *result) in sm_ll_lookup() 336 int sm_ll_find_free_block(struct ll_disk *ll, dm_block_t begin, in sm_ll_find_free_block() 337 dm_block_t end, dm_block_t *result) in sm_ll_find_free_block() 341 dm_block_t i, index_begin = begin; in sm_ll_find_free_block() 342 dm_block_t index_end = dm_sector_div_up(end, ll->entries_per_block); in sm_ll_find_free_block() [all …]
|
D | dm-block-manager.h | 18 typedef uint64_t dm_block_t; typedef 21 dm_block_t dm_block_location(struct dm_block *b); 41 dm_block_t dm_bm_nr_blocks(struct dm_block_manager *bm); 74 int dm_bm_read_lock(struct dm_block_manager *bm, dm_block_t b, 78 int dm_bm_write_lock(struct dm_block_manager *bm, dm_block_t b, 86 int dm_bm_read_try_lock(struct dm_block_manager *bm, dm_block_t b, 94 int dm_bm_write_lock_zero(struct dm_block_manager *bm, dm_block_t b, 114 void dm_bm_prefetch(struct dm_block_manager *bm, dm_block_t b);
|
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() 101 static int sm_disk_inc_blocks(struct dm_space_map *sm, dm_block_t b, dm_block_t e) in sm_disk_inc_blocks() 114 static int sm_disk_dec_blocks(struct dm_space_map *sm, dm_block_t b, dm_block_t e) in sm_disk_dec_blocks() [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, 103 dm_block_t shadow_root(struct shadow_spine *s); 156 int btree_get_overwrite_leaf(struct dm_btree_info *info, dm_block_t root, 158 dm_block_t *new_root, struct dm_block **leaf);
|
D | dm-array.c | 216 static int get_ablock(struct dm_array_info *info, dm_block_t b, in get_ablock() 249 static int lookup_ablock(struct dm_array_info *info, dm_block_t root, in lookup_ablock() 268 struct dm_block *block, dm_block_t *root) in insert_ablock() 278 static int __shadow_ablock(struct dm_array_info *info, dm_block_t b, in __shadow_ablock() 299 struct dm_block *block, dm_block_t b, in __reinsert_ablock() 300 dm_block_t *root) in __reinsert_ablock() 323 static int shadow_ablock(struct dm_array_info *info, dm_block_t *root, in shadow_ablock() 329 dm_block_t b; in shadow_ablock() 350 const void *value, dm_block_t *root) in insert_new_ablock() 370 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 int level) in push_frame() 270 int dm_btree_del(struct dm_btree_info *info, dm_block_t root) in dm_btree_del() 294 dm_block_t b; in dm_btree_del() 340 static int btree_lookup_raw(struct ro_spine *s, dm_block_t block, uint64_t key, in btree_lookup_raw() 371 int dm_btree_lookup(struct dm_btree_info *info, dm_block_t root, in dm_btree_lookup() 416 static int dm_btree_lookup_next_single(struct dm_btree_info *info, dm_block_t root, in dm_btree_lookup_next_single() 467 int dm_btree_lookup_next(struct dm_btree_info *info, dm_block_t root, in dm_btree_lookup_next() 703 dm_block_t root; in shadow_child() 964 static int get_node_free_space(struct dm_btree_info *info, dm_block_t b, unsigned int *space) in get_node_free_space() [all …]
|
D | dm-btree-spine.c | 91 int bn_read_lock(struct dm_btree_info *info, dm_block_t b, in bn_read_lock() 97 static int bn_shadow(struct dm_btree_info *info, dm_block_t orig, in bn_shadow() 140 int ro_step(struct ro_spine *s, dm_block_t new_child) in ro_step() 191 int shadow_step(struct shadow_spine *s, dm_block_t b, in shadow_step() 232 dm_block_t shadow_root(struct shadow_spine *s) in shadow_root()
|
D | dm-block-manager.c | 300 static void report_recursive_bug(dm_block_t b, int r) in report_recursive_bug() 333 dm_block_t dm_block_location(struct dm_block *b) in dm_block_location() 430 dm_block_t dm_bm_nr_blocks(struct dm_block_manager *bm) in dm_bm_nr_blocks() 462 int dm_bm_read_lock(struct dm_block_manager *bm, dm_block_t b, in dm_bm_read_lock() 496 dm_block_t b, struct dm_block_validator *v, in dm_bm_write_lock() 532 dm_block_t b, struct dm_block_validator *v, in dm_bm_read_try_lock() 565 dm_block_t b, struct dm_block_validator *v, in dm_bm_write_lock_zero() 619 void dm_bm_prefetch(struct dm_block_manager *bm, dm_block_t b) in dm_bm_prefetch()
|
D | dm-btree-remove.c | 163 dm_block_t root; in init_child() 489 dm_block_t b = value64(n, 0); in rebalance_children() 541 struct dm_btree_value_type *vt, dm_block_t root, in remove_raw() 589 int dm_btree_remove(struct dm_btree_info *info, dm_block_t root, in dm_btree_remove() 590 uint64_t *keys, dm_block_t *new_root) in dm_btree_remove() 634 struct dm_btree_value_type *vt, dm_block_t root, in remove_nearest() 686 static int remove_one(struct dm_btree_info *info, dm_block_t root, in remove_one() 688 dm_block_t *new_root, unsigned int *nr_removed) in remove_one() 743 int dm_btree_remove_leaves(struct dm_btree_info *info, dm_block_t root, in dm_btree_remove_leaves() 745 dm_block_t *new_root, unsigned int *nr_removed) in dm_btree_remove_leaves()
|
D | dm-space-map-metadata.h | 34 dm_block_t nr_blocks, 35 dm_block_t superblock);
|