Export map_info (part of bio->bi_private) for targets like multipath to use for storing context. Signed-Off-By: Alasdair G Kergon [Submitted upstream] --- diff/drivers/md/dm.c 2005-02-09 14:40:53.000000000 +0000 +++ source/drivers/md/dm.c 2005-02-09 14:41:43.000000000 +0000 @@ -43,6 +43,13 @@ union map_info info; }; +union map_info *dm_get_mapinfo(struct bio *bio) +{ + if (bio && bio->bi_private) + return &((struct target_io *)bio->bi_private)->info; + return NULL; +} + /* * Bits for the md->flags field. */ @@ -1164,6 +1171,8 @@ .owner = THIS_MODULE }; +EXPORT_SYMBOL(dm_get_mapinfo); + /* * module hooks */ --- diff/drivers/md/dm.h 2005-02-09 14:41:23.000000000 +0000 +++ source/drivers/md/dm.h 2005-02-09 14:41:43.000000000 +0000 @@ -190,5 +190,6 @@ void dm_stripe_exit(void); void *dm_vcalloc(unsigned long nmemb, unsigned long elem_size); +union map_info *dm_get_mapinfo(struct bio *bio); #endif