block: convert to dequeueing model (easy ones)
plat-omap/mailbox, floppy, viocd, mspro_block, i2o_block and mmc/card/queue are already pretty close to dequeueing model and can be converted with simple changes. Convert them. While at it, * xen-blkfront: !fs check moved downwards to share dequeue call with normal path. * mspro_block: __blk_end_request(..., blk_rq_cur_byte()) converted to __blk_end_request_cur() * mmc/card/queue: loop of __blk_end_request() converted to __blk_end_request_all() [ Impact: dequeue in-flight request ] Signed-off-by: Tejun Heo <tj@kernel.org> Cc: Rusty Russell <rusty@rustcorp.com.au> Cc: Jeremy Fitzhardinge <jeremy@xensource.com> Cc: Stephen Rothwell <sfr@canb.auug.org.au> Cc: Alex Dubov <oakad@yahoo.com> Cc: Markus Lidel <Markus.Lidel@shadowconnect.com> Cc: Pierre Ossman <drzeus@drzeus.cx> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
This commit is contained in:
@@ -672,8 +672,7 @@ try_again:
|
||||
msb->req_sg);
|
||||
|
||||
if (!msb->seg_count) {
|
||||
chunk = __blk_end_request(msb->block_req, -ENOMEM,
|
||||
blk_rq_cur_bytes(msb->block_req));
|
||||
chunk = __blk_end_request_cur(msb->block_req, -ENOMEM);
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -711,6 +710,7 @@ try_again:
|
||||
dev_dbg(&card->dev, "issue end\n");
|
||||
return -EAGAIN;
|
||||
}
|
||||
blkdev_dequeue_request(msb->block_req);
|
||||
|
||||
dev_dbg(&card->dev, "trying again\n");
|
||||
chunk = 1;
|
||||
@@ -825,8 +825,10 @@ static void mspro_block_submit_req(struct request_queue *q)
|
||||
return;
|
||||
|
||||
if (msb->eject) {
|
||||
while ((req = elv_next_request(q)) != NULL)
|
||||
while ((req = elv_next_request(q)) != NULL) {
|
||||
blkdev_dequeue_request(req);
|
||||
__blk_end_request_all(req, -ENODEV);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
Reference in New Issue
Block a user