dm: remove unused _rq_tio_cache and _rq_cache
Also move dm_rq_target_io structure definition from dm-rq.h to dm-rq.c
Fixes: 6a23e05c2f
("dm: remove legacy request-based IO path")
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
This commit is contained in:
parent
61697a6abd
commit
e689fbab3d
|
@ -12,6 +12,22 @@
|
||||||
|
|
||||||
#define DM_MSG_PREFIX "core-rq"
|
#define DM_MSG_PREFIX "core-rq"
|
||||||
|
|
||||||
|
/*
|
||||||
|
* One of these is allocated per request.
|
||||||
|
*/
|
||||||
|
struct dm_rq_target_io {
|
||||||
|
struct mapped_device *md;
|
||||||
|
struct dm_target *ti;
|
||||||
|
struct request *orig, *clone;
|
||||||
|
struct kthread_work work;
|
||||||
|
blk_status_t error;
|
||||||
|
union map_info info;
|
||||||
|
struct dm_stats_aux stats_aux;
|
||||||
|
unsigned long duration_jiffies;
|
||||||
|
unsigned n_sectors;
|
||||||
|
unsigned completed;
|
||||||
|
};
|
||||||
|
|
||||||
#define DM_MQ_NR_HW_QUEUES 1
|
#define DM_MQ_NR_HW_QUEUES 1
|
||||||
#define DM_MQ_QUEUE_DEPTH 2048
|
#define DM_MQ_QUEUE_DEPTH 2048
|
||||||
static unsigned dm_mq_nr_hw_queues = DM_MQ_NR_HW_QUEUES;
|
static unsigned dm_mq_nr_hw_queues = DM_MQ_NR_HW_QUEUES;
|
||||||
|
|
|
@ -16,22 +16,6 @@
|
||||||
|
|
||||||
struct mapped_device;
|
struct mapped_device;
|
||||||
|
|
||||||
/*
|
|
||||||
* One of these is allocated per request.
|
|
||||||
*/
|
|
||||||
struct dm_rq_target_io {
|
|
||||||
struct mapped_device *md;
|
|
||||||
struct dm_target *ti;
|
|
||||||
struct request *orig, *clone;
|
|
||||||
struct kthread_work work;
|
|
||||||
blk_status_t error;
|
|
||||||
union map_info info;
|
|
||||||
struct dm_stats_aux stats_aux;
|
|
||||||
unsigned long duration_jiffies;
|
|
||||||
unsigned n_sectors;
|
|
||||||
unsigned completed;
|
|
||||||
};
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* For request-based dm - the bio clones we allocate are embedded in these
|
* For request-based dm - the bio clones we allocate are embedded in these
|
||||||
* structs.
|
* structs.
|
||||||
|
|
|
@ -158,9 +158,6 @@ struct table_device {
|
||||||
struct dm_dev dm_dev;
|
struct dm_dev dm_dev;
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct kmem_cache *_rq_tio_cache;
|
|
||||||
static struct kmem_cache *_rq_cache;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Bio-based DM's mempools' reserved IOs set by the user.
|
* Bio-based DM's mempools' reserved IOs set by the user.
|
||||||
*/
|
*/
|
||||||
|
@ -222,20 +219,11 @@ static unsigned dm_get_numa_node(void)
|
||||||
|
|
||||||
static int __init local_init(void)
|
static int __init local_init(void)
|
||||||
{
|
{
|
||||||
int r = -ENOMEM;
|
int r;
|
||||||
|
|
||||||
_rq_tio_cache = KMEM_CACHE(dm_rq_target_io, 0);
|
|
||||||
if (!_rq_tio_cache)
|
|
||||||
return r;
|
|
||||||
|
|
||||||
_rq_cache = kmem_cache_create("dm_old_clone_request", sizeof(struct request),
|
|
||||||
__alignof__(struct request), 0, NULL);
|
|
||||||
if (!_rq_cache)
|
|
||||||
goto out_free_rq_tio_cache;
|
|
||||||
|
|
||||||
r = dm_uevent_init();
|
r = dm_uevent_init();
|
||||||
if (r)
|
if (r)
|
||||||
goto out_free_rq_cache;
|
return r;
|
||||||
|
|
||||||
deferred_remove_workqueue = alloc_workqueue("kdmremove", WQ_UNBOUND, 1);
|
deferred_remove_workqueue = alloc_workqueue("kdmremove", WQ_UNBOUND, 1);
|
||||||
if (!deferred_remove_workqueue) {
|
if (!deferred_remove_workqueue) {
|
||||||
|
@ -257,10 +245,6 @@ out_free_workqueue:
|
||||||
destroy_workqueue(deferred_remove_workqueue);
|
destroy_workqueue(deferred_remove_workqueue);
|
||||||
out_uevent_exit:
|
out_uevent_exit:
|
||||||
dm_uevent_exit();
|
dm_uevent_exit();
|
||||||
out_free_rq_cache:
|
|
||||||
kmem_cache_destroy(_rq_cache);
|
|
||||||
out_free_rq_tio_cache:
|
|
||||||
kmem_cache_destroy(_rq_tio_cache);
|
|
||||||
|
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
@ -270,8 +254,6 @@ static void local_exit(void)
|
||||||
flush_scheduled_work();
|
flush_scheduled_work();
|
||||||
destroy_workqueue(deferred_remove_workqueue);
|
destroy_workqueue(deferred_remove_workqueue);
|
||||||
|
|
||||||
kmem_cache_destroy(_rq_cache);
|
|
||||||
kmem_cache_destroy(_rq_tio_cache);
|
|
||||||
unregister_blkdev(_major, _name);
|
unregister_blkdev(_major, _name);
|
||||||
dm_uevent_exit();
|
dm_uevent_exit();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue