Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

dm cache: Remove unused functions in bio-prison-v1

dm_cache_size() and dm_cache_dump() are unused since commit
b29d4986d0da ("dm cache: significant rework to leverage dm-bio-prison-v2")

Remove them.

Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org>
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>

authored by

Dr. David Alan Gilbert and committed by
Mikulas Patocka
047b821c 0153b796

-59
-35
drivers/md/dm-bio-prison-v1.c
··· 198 198 } 199 199 EXPORT_SYMBOL_GPL(dm_bio_detain); 200 200 201 - int dm_get_cell(struct dm_bio_prison *prison, 202 - struct dm_cell_key *key, 203 - struct dm_bio_prison_cell *cell_prealloc, 204 - struct dm_bio_prison_cell **cell_result) 205 - { 206 - return bio_detain(prison, key, NULL, cell_prealloc, cell_result); 207 - } 208 - EXPORT_SYMBOL_GPL(dm_get_cell); 209 - 210 201 /* 211 202 * @inmates must have been initialised prior to this call 212 203 */ ··· 278 287 spin_unlock_irq(&prison->regions[l].lock); 279 288 } 280 289 EXPORT_SYMBOL_GPL(dm_cell_visit_release); 281 - 282 - static int __promote_or_release(struct rb_root *root, 283 - struct dm_bio_prison_cell *cell) 284 - { 285 - if (bio_list_empty(&cell->bios)) { 286 - rb_erase(&cell->node, root); 287 - return 1; 288 - } 289 - 290 - cell->holder = bio_list_pop(&cell->bios); 291 - return 0; 292 - } 293 - 294 - int dm_cell_promote_or_release(struct dm_bio_prison *prison, 295 - struct dm_bio_prison_cell *cell) 296 - { 297 - int r; 298 - unsigned l = lock_nr(&cell->key, prison->num_locks); 299 - 300 - spin_lock_irq(&prison->regions[l].lock); 301 - r = __promote_or_release(&prison->regions[l].cell, cell); 302 - spin_unlock_irq(&prison->regions[l].lock); 303 - 304 - return r; 305 - } 306 - EXPORT_SYMBOL_GPL(dm_cell_promote_or_release); 307 290 308 291 /*----------------------------------------------------------------*/ 309 292
-24
drivers/md/dm-bio-prison-v1.h
··· 73 73 struct dm_bio_prison_cell *cell); 74 74 75 75 /* 76 - * Creates, or retrieves a cell that overlaps the given key. 77 - * 78 - * Returns 1 if pre-existing cell returned, zero if new cell created using 79 - * @cell_prealloc. 80 - */ 81 - int dm_get_cell(struct dm_bio_prison *prison, 82 - struct dm_cell_key *key, 83 - struct dm_bio_prison_cell *cell_prealloc, 84 - struct dm_bio_prison_cell **cell_result); 85 - 86 - /* 87 76 * Returns false if key is beyond BIO_PRISON_MAX_RANGE or spans a boundary. 88 77 */ 89 78 bool dm_cell_key_has_valid_range(struct dm_cell_key *key); ··· 105 116 void dm_cell_visit_release(struct dm_bio_prison *prison, 106 117 void (*visit_fn)(void *, struct dm_bio_prison_cell *), 107 118 void *context, struct dm_bio_prison_cell *cell); 108 - 109 - /* 110 - * Rather than always releasing the prisoners in a cell, the client may 111 - * want to promote one of them to be the new holder. There is a race here 112 - * though between releasing an empty cell, and other threads adding new 113 - * inmates. So this function makes the decision with its lock held. 114 - * 115 - * This function can have two outcomes: 116 - * i) An inmate is promoted to be the holder of the cell (return value of 0). 117 - * ii) The cell has no inmate for promotion and is released (return value of 1). 118 - */ 119 - int dm_cell_promote_or_release(struct dm_bio_prison *prison, 120 - struct dm_bio_prison_cell *cell); 121 119 122 120 /*----------------------------------------------------------------*/ 123 121