diff options
author | Mikulas Patocka <mpatocka@redhat.com> | 2014-03-03 17:43:31 -0500 |
---|---|---|
committer | Mike Snitzer <snitzer@redhat.com> | 2014-03-27 16:56:24 -0400 |
commit | d70ab4fb723cf7acfa656cb2ad1e75be7ed94bef (patch) | |
tree | f32ef8e5e00e7b3ff0e35b61e5ff13f9738fdf48 | |
parent | 473c36dfeecf4e49db928f3284b2fbe981f8c284 (diff) |
dm: remove dm_get_mapinfo
Remove dm_get_mapinfo() because no target uses it. Targets can allocate
per-bio data using ti->per_bio_data_size, this is much more flexible
than union map_info.
Leave union map_info only for the request-based multipath target's use.
Also delete the unused "unsigned long long ll" field of union map_info.
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
-rw-r--r-- | drivers/md/dm.c | 10 | ||||
-rw-r--r-- | include/linux/device-mapper.h | 3 |
2 files changed, 0 insertions, 13 deletions
diff --git a/drivers/md/dm.c b/drivers/md/dm.c index 8c53b09b9a2c..ef5750d21235 100644 --- a/drivers/md/dm.c +++ b/drivers/md/dm.c | |||
@@ -94,13 +94,6 @@ struct dm_rq_clone_bio_info { | |||
94 | struct bio clone; | 94 | struct bio clone; |
95 | }; | 95 | }; |
96 | 96 | ||
97 | union map_info *dm_get_mapinfo(struct bio *bio) | ||
98 | { | ||
99 | if (bio && bio->bi_private) | ||
100 | return &((struct dm_target_io *)bio->bi_private)->info; | ||
101 | return NULL; | ||
102 | } | ||
103 | |||
104 | union map_info *dm_get_rq_mapinfo(struct request *rq) | 97 | union map_info *dm_get_rq_mapinfo(struct request *rq) |
105 | { | 98 | { |
106 | if (rq && rq->end_io_data) | 99 | if (rq && rq->end_io_data) |
@@ -1195,7 +1188,6 @@ static struct dm_target_io *alloc_tio(struct clone_info *ci, | |||
1195 | 1188 | ||
1196 | tio->io = ci->io; | 1189 | tio->io = ci->io; |
1197 | tio->ti = ti; | 1190 | tio->ti = ti; |
1198 | memset(&tio->info, 0, sizeof(tio->info)); | ||
1199 | tio->target_bio_nr = target_bio_nr; | 1191 | tio->target_bio_nr = target_bio_nr; |
1200 | 1192 | ||
1201 | return tio; | 1193 | return tio; |
@@ -2873,8 +2865,6 @@ static const struct block_device_operations dm_blk_dops = { | |||
2873 | .owner = THIS_MODULE | 2865 | .owner = THIS_MODULE |
2874 | }; | 2866 | }; |
2875 | 2867 | ||
2876 | EXPORT_SYMBOL(dm_get_mapinfo); | ||
2877 | |||
2878 | /* | 2868 | /* |
2879 | * module hooks | 2869 | * module hooks |
2880 | */ | 2870 | */ |
diff --git a/include/linux/device-mapper.h b/include/linux/device-mapper.h index ed419c62dde1..5eeeab470cfd 100644 --- a/include/linux/device-mapper.h +++ b/include/linux/device-mapper.h | |||
@@ -23,7 +23,6 @@ typedef enum { STATUSTYPE_INFO, STATUSTYPE_TABLE } status_type_t; | |||
23 | 23 | ||
24 | union map_info { | 24 | union map_info { |
25 | void *ptr; | 25 | void *ptr; |
26 | unsigned long long ll; | ||
27 | }; | 26 | }; |
28 | 27 | ||
29 | /* | 28 | /* |
@@ -291,7 +290,6 @@ struct dm_target_callbacks { | |||
291 | struct dm_target_io { | 290 | struct dm_target_io { |
292 | struct dm_io *io; | 291 | struct dm_io *io; |
293 | struct dm_target *ti; | 292 | struct dm_target *ti; |
294 | union map_info info; | ||
295 | unsigned target_bio_nr; | 293 | unsigned target_bio_nr; |
296 | struct bio clone; | 294 | struct bio clone; |
297 | }; | 295 | }; |
@@ -403,7 +401,6 @@ int dm_copy_name_and_uuid(struct mapped_device *md, char *name, char *uuid); | |||
403 | struct gendisk *dm_disk(struct mapped_device *md); | 401 | struct gendisk *dm_disk(struct mapped_device *md); |
404 | int dm_suspended(struct dm_target *ti); | 402 | int dm_suspended(struct dm_target *ti); |
405 | int dm_noflush_suspending(struct dm_target *ti); | 403 | int dm_noflush_suspending(struct dm_target *ti); |
406 | union map_info *dm_get_mapinfo(struct bio *bio); | ||
407 | union map_info *dm_get_rq_mapinfo(struct request *rq); | 404 | union map_info *dm_get_rq_mapinfo(struct request *rq); |
408 | 405 | ||
409 | struct queue_limits *dm_get_queue_limits(struct mapped_device *md); | 406 | struct queue_limits *dm_get_queue_limits(struct mapped_device *md); |