aboutsummaryrefslogtreecommitdiffstats
path: root/block
diff options
context:
space:
mode:
authorJens Axboe <axboe@suse.de>2006-08-10 02:59:11 -0400
committerJens Axboe <axboe@nelson.home.kernel.dk>2006-09-30 14:29:22 -0400
commit49171e5c6f414d49a061b5c1c84967c2eb569822 (patch)
tree95da6dad18f9bfe10367db86e740b8842f60a686 /block
parentc00895ab2f08df7044e58ee01c38bf0a661ea0eb (diff)
[PATCH] Remove struct request_list from struct request
It is always identical to &q->rq, and we only use it for detecting whether this request came out of our mempool or not. So replace it with an additional ->flags bit flag. Signed-off-by: Jens Axboe <axboe@suse.de>
Diffstat (limited to 'block')
-rw-r--r--block/ll_rw_blk.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/block/ll_rw_blk.c b/block/ll_rw_blk.c
index 3b6aad2affd8..f7462502bfdf 100644
--- a/block/ll_rw_blk.c
+++ b/block/ll_rw_blk.c
@@ -452,7 +452,6 @@ static void queue_flush(request_queue_t *q, unsigned which)
452 rq->elevator_private = NULL; 452 rq->elevator_private = NULL;
453 rq->elevator_private2 = NULL; 453 rq->elevator_private2 = NULL;
454 rq->rq_disk = q->bar_rq.rq_disk; 454 rq->rq_disk = q->bar_rq.rq_disk;
455 rq->rl = NULL;
456 rq->end_io = end_io; 455 rq->end_io = end_io;
457 q->prepare_flush_fn(q, rq); 456 q->prepare_flush_fn(q, rq);
458 457
@@ -480,7 +479,6 @@ static inline struct request *start_ordered(request_queue_t *q,
480 rq->cmd_flags |= q->ordered & QUEUE_ORDERED_FUA ? REQ_FUA : 0; 479 rq->cmd_flags |= q->ordered & QUEUE_ORDERED_FUA ? REQ_FUA : 0;
481 rq->elevator_private = NULL; 480 rq->elevator_private = NULL;
482 rq->elevator_private2 = NULL; 481 rq->elevator_private2 = NULL;
483 rq->rl = NULL;
484 init_request_from_bio(rq, q->orig_bar_rq->bio); 482 init_request_from_bio(rq, q->orig_bar_rq->bio);
485 rq->end_io = bar_end_io; 483 rq->end_io = bar_end_io;
486 484
@@ -2018,7 +2016,7 @@ blk_alloc_request(request_queue_t *q, int rw, struct bio *bio,
2018 * first three bits are identical in rq->cmd_flags and bio->bi_rw, 2016 * first three bits are identical in rq->cmd_flags and bio->bi_rw,
2019 * see bio.h and blkdev.h 2017 * see bio.h and blkdev.h
2020 */ 2018 */
2021 rq->cmd_flags = rw; 2019 rq->cmd_flags = rw | REQ_ALLOCED;
2022 2020
2023 if (priv) { 2021 if (priv) {
2024 if (unlikely(elv_set_request(q, rq, bio, gfp_mask))) { 2022 if (unlikely(elv_set_request(q, rq, bio, gfp_mask))) {
@@ -2196,7 +2194,6 @@ rq_starved:
2196 ioc->nr_batch_requests--; 2194 ioc->nr_batch_requests--;
2197 2195
2198 rq_init(q, rq); 2196 rq_init(q, rq);
2199 rq->rl = rl;
2200 2197
2201 blk_add_trace_generic(q, bio, rw, BLK_TA_GETRQ); 2198 blk_add_trace_generic(q, bio, rw, BLK_TA_GETRQ);
2202out: 2199out:
@@ -2681,8 +2678,6 @@ EXPORT_SYMBOL_GPL(disk_round_stats);
2681 */ 2678 */
2682void __blk_put_request(request_queue_t *q, struct request *req) 2679void __blk_put_request(request_queue_t *q, struct request *req)
2683{ 2680{
2684 struct request_list *rl = req->rl;
2685
2686 if (unlikely(!q)) 2681 if (unlikely(!q))
2687 return; 2682 return;
2688 if (unlikely(--req->ref_count)) 2683 if (unlikely(--req->ref_count))
@@ -2691,13 +2686,12 @@ void __blk_put_request(request_queue_t *q, struct request *req)
2691 elv_completed_request(q, req); 2686 elv_completed_request(q, req);
2692 2687
2693 req->rq_status = RQ_INACTIVE; 2688 req->rq_status = RQ_INACTIVE;
2694 req->rl = NULL;
2695 2689
2696 /* 2690 /*
2697 * Request may not have originated from ll_rw_blk. if not, 2691 * Request may not have originated from ll_rw_blk. if not,
2698 * it didn't come out of our reserved rq pools 2692 * it didn't come out of our reserved rq pools
2699 */ 2693 */
2700 if (rl) { 2694 if (req->cmd_flags & REQ_ALLOCED) {
2701 int rw = rq_data_dir(req); 2695 int rw = rq_data_dir(req);
2702 int priv = req->cmd_flags & REQ_ELVPRIV; 2696 int priv = req->cmd_flags & REQ_ELVPRIV;
2703 2697