[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20070911.145658.112978437.k-ueda@ct.jp.nec.com>
Date: Tue, 11 Sep 2007 14:56:58 -0400 (EDT)
From: Kiyoshi Ueda <k-ueda@...jp.nec.com>
To: jens.axboe@...cle.com, linux-kernel@...r.kernel.org,
linux-scsi@...r.kernel.org, linux-ide@...r.kernel.org,
mike.miller@...com, grant.likely@...retlab.ca
Cc: dm-devel@...hat.com, j-nomura@...jp.nec.com, k-ueda@...jp.nec.com
Subject: [PATCH 03/27] blk_end_request: changing block layer core (take 2)
This patch converts core parts of block layer to use blk_end_request().
Signed-off-by: Kiyoshi Ueda <k-ueda@...jp.nec.com>
Signed-off-by: Jun'ichi Nomura <j-nomura@...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@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists