mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-01 02:36:02 +00:00
dm cache: Remove unused functions in bio-prison-v1
dm_cache_size() and dm_cache_dump() are unused since commit
b29d4986d0
("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>
This commit is contained in:
parent
0153b7965d
commit
047b821ca3
@ -198,15 +198,6 @@ int dm_bio_detain(struct dm_bio_prison *prison,
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(dm_bio_detain);
|
||||
|
||||
int dm_get_cell(struct dm_bio_prison *prison,
|
||||
struct dm_cell_key *key,
|
||||
struct dm_bio_prison_cell *cell_prealloc,
|
||||
struct dm_bio_prison_cell **cell_result)
|
||||
{
|
||||
return bio_detain(prison, key, NULL, cell_prealloc, cell_result);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(dm_get_cell);
|
||||
|
||||
/*
|
||||
* @inmates must have been initialised prior to this call
|
||||
*/
|
||||
@ -288,32 +279,6 @@ void dm_cell_visit_release(struct dm_bio_prison *prison,
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(dm_cell_visit_release);
|
||||
|
||||
static int __promote_or_release(struct rb_root *root,
|
||||
struct dm_bio_prison_cell *cell)
|
||||
{
|
||||
if (bio_list_empty(&cell->bios)) {
|
||||
rb_erase(&cell->node, root);
|
||||
return 1;
|
||||
}
|
||||
|
||||
cell->holder = bio_list_pop(&cell->bios);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int dm_cell_promote_or_release(struct dm_bio_prison *prison,
|
||||
struct dm_bio_prison_cell *cell)
|
||||
{
|
||||
int r;
|
||||
unsigned l = lock_nr(&cell->key, prison->num_locks);
|
||||
|
||||
spin_lock_irq(&prison->regions[l].lock);
|
||||
r = __promote_or_release(&prison->regions[l].cell, cell);
|
||||
spin_unlock_irq(&prison->regions[l].lock);
|
||||
|
||||
return r;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(dm_cell_promote_or_release);
|
||||
|
||||
/*----------------------------------------------------------------*/
|
||||
|
||||
#define DEFERRED_SET_SIZE 64
|
||||
|
@ -72,17 +72,6 @@ struct dm_bio_prison_cell *dm_bio_prison_alloc_cell(struct dm_bio_prison *prison
|
||||
void dm_bio_prison_free_cell(struct dm_bio_prison *prison,
|
||||
struct dm_bio_prison_cell *cell);
|
||||
|
||||
/*
|
||||
* Creates, or retrieves a cell that overlaps the given key.
|
||||
*
|
||||
* Returns 1 if pre-existing cell returned, zero if new cell created using
|
||||
* @cell_prealloc.
|
||||
*/
|
||||
int dm_get_cell(struct dm_bio_prison *prison,
|
||||
struct dm_cell_key *key,
|
||||
struct dm_bio_prison_cell *cell_prealloc,
|
||||
struct dm_bio_prison_cell **cell_result);
|
||||
|
||||
/*
|
||||
* Returns false if key is beyond BIO_PRISON_MAX_RANGE or spans a boundary.
|
||||
*/
|
||||
@ -117,19 +106,6 @@ void dm_cell_visit_release(struct dm_bio_prison *prison,
|
||||
void (*visit_fn)(void *, struct dm_bio_prison_cell *),
|
||||
void *context, struct dm_bio_prison_cell *cell);
|
||||
|
||||
/*
|
||||
* Rather than always releasing the prisoners in a cell, the client may
|
||||
* want to promote one of them to be the new holder. There is a race here
|
||||
* though between releasing an empty cell, and other threads adding new
|
||||
* inmates. So this function makes the decision with its lock held.
|
||||
*
|
||||
* This function can have two outcomes:
|
||||
* i) An inmate is promoted to be the holder of the cell (return value of 0).
|
||||
* ii) The cell has no inmate for promotion and is released (return value of 1).
|
||||
*/
|
||||
int dm_cell_promote_or_release(struct dm_bio_prison *prison,
|
||||
struct dm_bio_prison_cell *cell);
|
||||
|
||||
/*----------------------------------------------------------------*/
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user