lkml.org 
[lkml]   [2007]   [Sep]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
Subject[PATCH 03/27] blk_end_request: changing block layer core (take 2)
From
This patch converts core parts of block layer to use blk_end_request().

Signed-off-by: Kiyoshi Ueda <k-ueda@ct.jp.nec.com>
Signed-off-by: Jun'ichi Nomura <j-nomura@ce.jp.nec.com>
---
block/ll_rw_blk.c | 15 +++++----------
1 files changed, 5 insertions(+), 10 deletions(-)

diff -rupN 02-rq-size-macro/block/ll_rw_blk.c 03-blkcore-caller-change/block/ll_rw_blk.c
--- 02-rq-size-macro/block/ll_rw_blk.c 2007-09-10 17:42:56.000000000 -0400
+++ 03-blkcore-caller-change/block/ll_rw_blk.c 2007-09-10 17:57:59.000000000 -0400
@@ -365,8 +365,8 @@ void blk_ordered_complete_seq(struct req
q->ordseq = 0;
rq = q->orig_bar_rq;

- end_that_request_first(rq, uptodate, rq->hard_nr_sectors);
- end_that_request_last(rq, uptodate);
+ if (__blk_end_request(rq, uptodate, blk_rq_size(rq)))
+ BUG();
}

static void pre_flush_end_io(struct request *rq, int error)
@@ -484,9 +484,8 @@ int blk_do_ordered(struct request_queue
* ORDERED_NONE while this request is on it.
*/
blkdev_dequeue_request(rq);
- end_that_request_first(rq, -EOPNOTSUPP,
- rq->hard_nr_sectors);
- end_that_request_last(rq, -EOPNOTSUPP);
+ if (__blk_end_request(rq, -EOPNOTSUPP, blk_rq_size(rq)))
+ BUG();
*rqp = NULL;
return 0;
}
@@ -3720,11 +3719,7 @@ EXPORT_SYMBOL(end_that_request_last);
static inline void __end_request(struct request *rq, int uptodate,
unsigned int nr_bytes)
{
- if (!end_that_request_chunk(rq, uptodate, nr_bytes)) {
- blkdev_dequeue_request(rq);
- add_disk_randomness(rq->rq_disk);
- end_that_request_last(rq, uptodate);
- }
+ __blk_end_request(rq, uptodate, nr_bytes);
}

/**
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2007-09-11 20:59    [W:0.140 / U:0.076 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site