aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/dm.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@infradead.org>2011-09-12 06:12:01 -0400
committerJens Axboe <jaxboe@fusionio.com>2011-09-12 06:12:01 -0400
commit5a7bbad27a410350e64a2d7f5ec18fc73836c14f (patch)
tree3447cd62dbcbd77b4071e2eb7576f1d7632ef2d3 /drivers/md/dm.c
parentc20e8de27fef9f59869c81c288ad6cf28200e00c (diff)
block: remove support for bio remapping from ->make_request
There is very little benefit in allowing to let a ->make_request instance update the bios device and sector and loop around it in __generic_make_request when we can archive the same through calling generic_make_request from the driver and letting the loop in generic_make_request handle it. Note that various drivers got the return value from ->make_request and returned non-zero values for errors. Signed-off-by: Christoph Hellwig <hch@lst.de> Acked-by: NeilBrown <neilb@suse.de> Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
Diffstat (limited to 'drivers/md/dm.c')
-rw-r--r--drivers/md/dm.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/md/dm.c b/drivers/md/dm.c
index 78b20868bcbc..7b986e77b75e 100644
--- a/drivers/md/dm.c
+++ b/drivers/md/dm.c
@@ -1388,7 +1388,7 @@ out:
1388 * The request function that just remaps the bio built up by 1388 * The request function that just remaps the bio built up by
1389 * dm_merge_bvec. 1389 * dm_merge_bvec.
1390 */ 1390 */
1391static int _dm_request(struct request_queue *q, struct bio *bio) 1391static void _dm_request(struct request_queue *q, struct bio *bio)
1392{ 1392{
1393 int rw = bio_data_dir(bio); 1393 int rw = bio_data_dir(bio);
1394 struct mapped_device *md = q->queuedata; 1394 struct mapped_device *md = q->queuedata;
@@ -1409,12 +1409,12 @@ static int _dm_request(struct request_queue *q, struct bio *bio)
1409 queue_io(md, bio); 1409 queue_io(md, bio);
1410 else 1410 else
1411 bio_io_error(bio); 1411 bio_io_error(bio);
1412 return 0; 1412 return;
1413 } 1413 }
1414 1414
1415 __split_and_process_bio(md, bio); 1415 __split_and_process_bio(md, bio);
1416 up_read(&md->io_lock); 1416 up_read(&md->io_lock);
1417 return 0; 1417 return;
1418} 1418}
1419 1419
1420static int dm_request_based(struct mapped_device *md) 1420static int dm_request_based(struct mapped_device *md)
@@ -1422,14 +1422,14 @@ static int dm_request_based(struct mapped_device *md)
1422 return blk_queue_stackable(md->queue); 1422 return blk_queue_stackable(md->queue);
1423} 1423}
1424 1424
1425static int dm_request(struct request_queue *q, struct bio *bio) 1425static void dm_request(struct request_queue *q, struct bio *bio)
1426{ 1426{
1427 struct mapped_device *md = q->queuedata; 1427 struct mapped_device *md = q->queuedata;
1428 1428
1429 if (dm_request_based(md)) 1429 if (dm_request_based(md))
1430 return blk_queue_bio(q, bio); 1430 blk_queue_bio(q, bio);
1431 1431 else
1432 return _dm_request(q, bio); 1432 _dm_request(q, bio);
1433} 1433}
1434 1434
1435void dm_dispatch_request(struct request *rq) 1435void dm_dispatch_request(struct request *rq)