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>
This commit is contained in:

committed by
Jens Axboe

parent
c20e8de27f
commit
5a7bbad27a
@@ -1388,7 +1388,7 @@ out:
|
||||
* The request function that just remaps the bio built up by
|
||||
* dm_merge_bvec.
|
||||
*/
|
||||
static int _dm_request(struct request_queue *q, struct bio *bio)
|
||||
static void _dm_request(struct request_queue *q, struct bio *bio)
|
||||
{
|
||||
int rw = bio_data_dir(bio);
|
||||
struct mapped_device *md = q->queuedata;
|
||||
@@ -1409,12 +1409,12 @@ static int _dm_request(struct request_queue *q, struct bio *bio)
|
||||
queue_io(md, bio);
|
||||
else
|
||||
bio_io_error(bio);
|
||||
return 0;
|
||||
return;
|
||||
}
|
||||
|
||||
__split_and_process_bio(md, bio);
|
||||
up_read(&md->io_lock);
|
||||
return 0;
|
||||
return;
|
||||
}
|
||||
|
||||
static int dm_request_based(struct mapped_device *md)
|
||||
@@ -1422,14 +1422,14 @@ static int dm_request_based(struct mapped_device *md)
|
||||
return blk_queue_stackable(md->queue);
|
||||
}
|
||||
|
||||
static int dm_request(struct request_queue *q, struct bio *bio)
|
||||
static void dm_request(struct request_queue *q, struct bio *bio)
|
||||
{
|
||||
struct mapped_device *md = q->queuedata;
|
||||
|
||||
if (dm_request_based(md))
|
||||
return blk_queue_bio(q, bio);
|
||||
|
||||
return _dm_request(q, bio);
|
||||
blk_queue_bio(q, bio);
|
||||
else
|
||||
_dm_request(q, bio);
|
||||
}
|
||||
|
||||
void dm_dispatch_request(struct request *rq)
|
||||
|
Reference in New Issue
Block a user