diff options
author | Tejun Heo <tj@kernel.org> | 2009-05-07 22:54:15 -0400 |
---|---|---|
committer | Jens Axboe <jens.axboe@oracle.com> | 2009-05-11 03:52:17 -0400 |
commit | 296b2f6ae654581adc27f0d6f0af454c7f3d06ee (patch) | |
tree | 8fab2b91741336d41e559a839b547d7ac3090524 /drivers/memstick | |
parent | fb3ac7f6b811eac8e0aafa3df1c16ed872e898a8 (diff) |
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>
Diffstat (limited to 'drivers/memstick')
-rw-r--r-- | drivers/memstick/core/mspro_block.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/memstick/core/mspro_block.c b/drivers/memstick/core/mspro_block.c index 93b2c618565..58f5be8cd69 100644 --- a/drivers/memstick/core/mspro_block.c +++ b/drivers/memstick/core/mspro_block.c | |||
@@ -672,8 +672,7 @@ try_again: | |||
672 | msb->req_sg); | 672 | msb->req_sg); |
673 | 673 | ||
674 | if (!msb->seg_count) { | 674 | if (!msb->seg_count) { |
675 | chunk = __blk_end_request(msb->block_req, -ENOMEM, | 675 | chunk = __blk_end_request_cur(msb->block_req, -ENOMEM); |
676 | blk_rq_cur_bytes(msb->block_req)); | ||
677 | continue; | 676 | continue; |
678 | } | 677 | } |
679 | 678 | ||
@@ -711,6 +710,7 @@ try_again: | |||
711 | dev_dbg(&card->dev, "issue end\n"); | 710 | dev_dbg(&card->dev, "issue end\n"); |
712 | return -EAGAIN; | 711 | return -EAGAIN; |
713 | } | 712 | } |
713 | blkdev_dequeue_request(msb->block_req); | ||
714 | 714 | ||
715 | dev_dbg(&card->dev, "trying again\n"); | 715 | dev_dbg(&card->dev, "trying again\n"); |
716 | chunk = 1; | 716 | chunk = 1; |
@@ -825,8 +825,10 @@ static void mspro_block_submit_req(struct request_queue *q) | |||
825 | return; | 825 | return; |
826 | 826 | ||
827 | if (msb->eject) { | 827 | if (msb->eject) { |
828 | while ((req = elv_next_request(q)) != NULL) | 828 | while ((req = elv_next_request(q)) != NULL) { |
829 | blkdev_dequeue_request(req); | ||
829 | __blk_end_request_all(req, -ENODEV); | 830 | __blk_end_request_all(req, -ENODEV); |
831 | } | ||
830 | 832 | ||
831 | return; | 833 | return; |
832 | } | 834 | } |