Home
last modified time | relevance | path

Searched refs:region_nr (Results 1 – 4 of 4) sorted by relevance

/linux-6.6.21/drivers/md/
Ddm-switch.c127 static void switch_get_position(struct switch_ctx *sctx, unsigned long region_nr, in switch_get_position() argument
131 *region_index = region_nr >> sctx->region_entries_per_slot_bits; in switch_get_position()
132 *bit = region_nr & (sctx->region_entries_per_slot - 1); in switch_get_position()
134 *region_index = region_nr / sctx->region_entries_per_slot; in switch_get_position()
135 *bit = region_nr % sctx->region_entries_per_slot; in switch_get_position()
141 static unsigned int switch_region_table_read(struct switch_ctx *sctx, unsigned long region_nr) in switch_region_table_read() argument
146 switch_get_position(sctx, region_nr, &region_index, &bit); in switch_region_table_read()
175 static void switch_region_table_write(struct switch_ctx *sctx, unsigned long region_nr, in switch_region_table_write() argument
182 switch_get_position(sctx, region_nr, &region_index, &bit); in switch_region_table_write()
196 unsigned long region_nr; in initialise_region_table() local
[all …]
Ddm-clone-metadata.c635 bool dm_clone_is_region_hydrated(struct dm_clone_metadata *cmd, unsigned long region_nr) in dm_clone_is_region_hydrated() argument
637 return dm_clone_is_hydration_done(cmd) || test_bit(region_nr, cmd->region_map); in dm_clone_is_region_hydrated()
841 int dm_clone_set_region_hydrated(struct dm_clone_metadata *cmd, unsigned long region_nr) in dm_clone_set_region_hydrated() argument
847 if (unlikely(region_nr >= cmd->nr_regions)) { in dm_clone_set_region_hydrated()
849 region_nr, cmd->nr_regions); in dm_clone_set_region_hydrated()
853 word = region_nr / BITS_PER_LONG; in dm_clone_set_region_hydrated()
865 __set_bit(region_nr, dmap->dirty_regions); in dm_clone_set_region_hydrated()
866 __set_bit(region_nr, cmd->region_map); in dm_clone_set_region_hydrated()
880 unsigned long word, region_nr; in dm_clone_cond_set_range() local
897 for (region_nr = start; region_nr < (start + nr_regions); region_nr++) { in dm_clone_cond_set_range()
[all …]
Ddm-clone-target.c276 static inline sector_t region_to_sector(struct clone *clone, unsigned long region_nr) in region_to_sector() argument
278 return ((sector_t)region_nr << clone->region_shift); in region_to_sector()
531 unsigned long region_nr; member
603 unsigned long region_nr) in get_hash_table_bucket() argument
605 return &clone->ht[hash_long(region_nr, HASH_TABLE_BITS)]; in get_hash_table_bucket()
614 unsigned long region_nr) in __hash_find() argument
619 if (hd->region_nr == region_nr) in __hash_find()
650 hd2 = __hash_find(bucket, hd->region_nr); in __find_or_insert_region_hydration()
682 static void hydration_init(struct dm_clone_region_hydration *hd, unsigned long region_nr) in hydration_init() argument
684 hd->region_nr = region_nr; in hydration_init()
[all …]
Ddm-clone-metadata.h37 int dm_clone_set_region_hydrated(struct dm_clone_metadata *cmd, unsigned long region_nr);
148 bool dm_clone_is_region_hydrated(struct dm_clone_metadata *cmd, unsigned long region_nr);