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

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>

authored by

Mikulas Patocka and committed by
Mike Snitzer
d70ab4fb 473c36df

-13
-10
drivers/md/dm.c
··· 94 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 97 union map_info *dm_get_rq_mapinfo(struct request *rq) 105 98 { 106 99 if (rq && rq->end_io_data) ··· 1188 1195 1189 1196 tio->io = ci->io; 1190 1197 tio->ti = ti; 1191 - memset(&tio->info, 0, sizeof(tio->info)); 1192 1198 tio->target_bio_nr = target_bio_nr; 1193 1199 1194 1200 return tio; ··· 2864 2872 .getgeo = dm_blk_getgeo, 2865 2873 .owner = THIS_MODULE 2866 2874 }; 2867 - 2868 - EXPORT_SYMBOL(dm_get_mapinfo); 2869 2875 2870 2876 /* 2871 2877 * module hooks
-3
include/linux/device-mapper.h
··· 23 23 24 24 union map_info { 25 25 void *ptr; 26 - unsigned long long ll; 27 26 }; 28 27 29 28 /* ··· 290 291 struct dm_target_io { 291 292 struct dm_io *io; 292 293 struct dm_target *ti; 293 - union map_info info; 294 294 unsigned target_bio_nr; 295 295 struct bio clone; 296 296 }; ··· 401 403 struct gendisk *dm_disk(struct mapped_device *md); 402 404 int dm_suspended(struct dm_target *ti); 403 405 int dm_noflush_suspending(struct dm_target *ti); 404 - union map_info *dm_get_mapinfo(struct bio *bio); 405 406 union map_info *dm_get_rq_mapinfo(struct request *rq); 406 407 407 408 struct queue_limits *dm_get_queue_limits(struct mapped_device *md);