Home
last modified time | relevance | path

Searched refs:dm_block_t (Results 1 – 32 of 32) sorted by relevance

/linux-4.1.27/drivers/md/persistent-data/
Ddm-space-map.h24 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 …]
Ddm-bitset.h93 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 …]
Ddm-space-map-common.h50 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 …]
Ddm-btree.h94 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,
115 int dm_btree_insert(struct dm_btree_info *info, dm_block_t root,
116 uint64_t *keys, void *value, dm_block_t *new_root)
124 int dm_btree_insert_notify(struct dm_btree_info *info, dm_block_t root,
125 uint64_t *keys, void *value, dm_block_t *new_root,
134 int dm_btree_remove(struct dm_btree_info *info, dm_block_t root,
135 uint64_t *keys, dm_block_t *new_root);
142 int dm_btree_find_lowest_key(struct dm_btree_info *info, dm_block_t root,
[all …]
Ddm-bitset.c36 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 …]
Ddm-array.h92 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)
118 int dm_array_del(struct dm_array_info *info, dm_block_t root);
130 int dm_array_get_value(struct dm_array_info *info, dm_block_t root,
148 int dm_array_set_value(struct dm_array_info *info, dm_block_t root,
149 uint32_t index, const void *value, dm_block_t *new_root)
160 int dm_array_walk(struct dm_array_info *info, dm_block_t root,
Ddm-space-map-metadata.c25 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()
163 dm_block_t begin;
172 static int add_bop(struct sm_metadata *smm, enum block_op_type type, dm_block_t b) in add_bop()
270 static int sm_metadata_get_nr_blocks(struct dm_space_map *sm, dm_block_t *count) in sm_metadata_get_nr_blocks()
[all …]
Ddm-block-manager.h18 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);
Ddm-transaction-manager.h85 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,
Ddm-transaction-manager.c24 #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 …]
Ddm-space-map-disk.c30 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 …]
Ddm-space-map-common.c232 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()
277 int sm_ll_lookup_bitmap(struct ll_disk *ll, dm_block_t b, uint32_t *result) in sm_ll_lookup_bitmap()
280 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 …]
Ddm-array.c220 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()
285 static int shadow_ablock(struct dm_array_info *info, dm_block_t *root, in shadow_ablock()
291 dm_block_t b; in shadow_ablock()
340 const void *value, dm_block_t *root) in insert_new_ablock()
360 dm_block_t *root) in insert_full_ablocks()
384 dm_block_t root;
635 int dm_array_empty(struct dm_array_info *info, dm_block_t *root) in dm_array_empty()
641 static int array_resize(struct dm_array_info *info, dm_block_t root, in array_resize()
[all …]
Ddm-btree.c121 int dm_btree_empty(struct dm_btree_info *info, dm_block_t *root) in dm_btree_empty()
201 static int push_frame(struct del_stack *s, dm_block_t b, unsigned level) in push_frame()
253 int dm_btree_del(struct dm_btree_info *info, dm_block_t root) in dm_btree_del()
272 dm_block_t b; in dm_btree_del()
318 static int btree_lookup_raw(struct ro_spine *s, dm_block_t block, uint64_t key, in btree_lookup_raw()
348 int dm_btree_lookup(struct dm_btree_info *info, dm_block_t root, in dm_btree_lookup()
423 static int btree_split_sibling(struct shadow_spine *s, dm_block_t root, in btree_split_sibling()
595 static int btree_insert_raw(struct shadow_spine *s, dm_block_t root, in btree_insert_raw()
658 static int insert(struct dm_btree_info *info, dm_block_t root, in insert()
659 uint64_t *keys, void *value, dm_block_t *new_root, in insert()
[all …]
Ddm-btree-internal.h48 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,
Ddm-space-map-metadata.h34 dm_block_t nr_blocks,
35 dm_block_t superblock);
Ddm-block-manager.c307 static void report_recursive_bug(dm_block_t b, int r) in report_recursive_bug()
328 dm_block_t dm_block_location(struct dm_block *b) in dm_block_location()
416 dm_block_t dm_bm_nr_blocks(struct dm_block_manager *bm) in dm_bm_nr_blocks()
448 int dm_bm_read_lock(struct dm_block_manager *bm, dm_block_t b, in dm_bm_read_lock()
482 dm_block_t b, struct dm_block_validator *v, in dm_bm_write_lock()
518 dm_block_t b, struct dm_block_validator *v, in dm_bm_read_try_lock()
551 dm_block_t b, struct dm_block_validator *v, in dm_bm_write_lock_zero()
607 void dm_bm_prefetch(struct dm_block_manager *bm, dm_block_t b) in dm_bm_prefetch()
Ddm-btree-spine.c95 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()
148 int ro_step(struct ro_spine *s, dm_block_t new_child) in ro_step()
205 int shadow_step(struct shadow_spine *s, dm_block_t b, in shadow_step()
Ddm-btree-remove.c147 dm_block_t root; in init_child()
418 dm_block_t b, uint32_t *result) in get_nr_entries()
446 dm_block_t b = value64(n, 0); in rebalance_children()
504 struct dm_btree_value_type *vt, dm_block_t root, in remove_raw()
552 int dm_btree_remove(struct dm_btree_info *info, dm_block_t root, in dm_btree_remove()
553 uint64_t *keys, dm_block_t *new_root) in dm_btree_remove()
Ddm-persistent-data-internal.h12 static inline unsigned dm_hash_block(dm_block_t b, unsigned hash_mask) in dm_hash_block()
Ddm-space-map-disk.h20 dm_block_t nr_blocks);
/linux-4.1.27/drivers/md/
Ddm-thin-metadata.h119 dm_block_t *result);
136 dm_block_t block;
146 int dm_thin_find_block(struct dm_thin_device *td, dm_block_t block,
152 int dm_pool_alloc_data_block(struct dm_pool_metadata *pmd, dm_block_t *result);
157 int dm_thin_insert_block(struct dm_thin_device *td, dm_block_t block,
158 dm_block_t data_block);
160 int dm_thin_remove_block(struct dm_thin_device *td, dm_block_t block);
172 dm_block_t *highest_mapped);
174 int dm_thin_get_mapped_count(struct dm_thin_device *td, dm_block_t *result);
177 dm_block_t *result);
[all …]
Ddm-cache-block-types.h20 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()
Ddm-thin-metadata.c181 dm_block_t root;
182 dm_block_t details_root;
279 static uint64_t pack_block_time(dm_block_t b, uint32_t t) in pack_block_time()
284 static void unpack_block_time(uint64_t v, dm_block_t *b, uint32_t *t) in unpack_block_time()
974 dm_block_t dev_root; in __create_thin()
1051 dm_block_t origin_root; in __create_snap()
1205 dm_block_t held_root; in __reserve_metadata_snap()
1276 dm_block_t held_root; in __release_metadata_snap()
1318 dm_block_t *result) in __get_metadata_snap()
1336 dm_block_t *result) in dm_pool_get_metadata_snap()
[all …]
Ddm-era-target.c29 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 …]
Ddm-thin.c116 dm_block_t b, struct dm_cell_key *key) in build_data_key()
124 static void build_virtual_key(struct dm_thin_device *td, dm_block_t b, in build_virtual_key()
223 dm_block_t low_water_blocks;
280 dm_block_t low_water_blocks;
550 static dm_block_t get_bio_block(struct thin_c *tc, struct bio *bio) in get_bio_block()
563 static void remap(struct thin_c *tc, struct bio *bio, dm_block_t block) in remap()
636 dm_block_t block) in remap_and_issue()
662 dm_block_t virt_block;
663 dm_block_t data_block;
771 dm_block_t block) in inc_remap_and_issue_cell()
[all …]
Ddm-cache-metadata.h111 dm_block_t *result);
114 dm_block_t *result);
Ddm-bio-prison.h33 dm_block_t block_begin, block_end;
Ddm-cache-metadata.c110 dm_block_t root;
111 dm_block_t hint_root;
112 dm_block_t discard_root;
960 dm_block_t b; in __load_discards()
1279 dm_block_t *result) in dm_cache_get_free_metadata_block_count()
1291 dm_block_t *result) in dm_cache_get_metadata_dev_size()
Ddm-cache-target.c559 static dm_block_t block_div(dm_block_t b, uint32_t n) in block_div()
566 static dm_block_t oblocks_per_dblock(struct cache *cache) in oblocks_per_dblock()
568 dm_block_t oblocks = cache->discard_block_size; in oblocks_per_dblock()
2338 dm_block_t nr_blocks = from_cblock(size); in set_cache_size()
2357 dm_block_t origin_blocks; in cache_create()
2399 dm_block_t cache_size = ca->cache_sectors; in cache_create()
2867 dm_block_t block_size;
2868 dm_block_t discard_begin, discard_end;
3065 dm_block_t nr_free_blocks_metadata = 0; in cache_status()
3066 dm_block_t nr_blocks_metadata = 0; in cache_status()
Ddm-cache-policy-cleaner.c34 dm_block_t hash_bits;
Ddm-cache-policy-mq.c480 dm_block_t hash_bits;