lkml.org 
[lkml]   [2013]   [Oct]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH 4/5] blk-mq: kill blk_mq_finish_request
It can be merged into the only caller, and doing so allows accounting for
I/O completion in the correct place as well.

Signed-off-by: Christoph Hellwig <hch@lst.de>
---
block/blk-mq.c | 14 +++++---------
1 file changed, 5 insertions(+), 9 deletions(-)

diff --git a/block/blk-mq.c b/block/blk-mq.c
index c137541..99a600e 100644
--- a/block/blk-mq.c
+++ b/block/blk-mq.c
@@ -284,11 +284,13 @@ static void blk_mq_bio_endio(struct request *rq, struct bio *bio, int error)
bio_endio(bio, error);
}

-static void blk_mq_finish_request(struct request *rq, int error)
+void blk_mq_complete_request(struct request *rq, int error)
{
struct bio *bio = rq->bio;
unsigned int bytes = 0;

+ trace_block_rq_complete(rq->q, rq);
+
while (bio) {
struct bio *next = bio->bi_next;

@@ -299,19 +301,13 @@ static void blk_mq_finish_request(struct request *rq, int error)
}

blk_account_io_completion(rq, bytes);
- blk_account_io_done(rq);
-}
-
-void blk_mq_complete_request(struct request *rq, int error)
-{
- trace_block_rq_complete(rq->q, rq);
-
- blk_mq_finish_request(rq, error);

if (rq->end_io)
rq->end_io(rq, error);
else
blk_mq_free_request(rq);
+
+ blk_account_io_done(rq);
}

void __blk_mq_end_io(struct request *rq, int error)
--
1.7.10.4



\
 
 \ /
  Last update: 2013-10-06 17:41    [W:0.103 / U:0.504 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site