aboutsummaryrefslogtreecommitdiffstats
path: root/block/ll_rw_blk.c
diff options
context:
space:
mode:
authorJens Axboe <axboe@suse.de>2006-08-10 08:59:11 +0200
committerJens Axboe <axboe@nelson.home.kernel.dk>2006-09-30 20:29:22 +0200
commit49171e5c6f414d49a061b5c1c84967c2eb569822 (patch)
tree95da6dad18f9bfe10367db86e740b8842f60a686 /block/ll_rw_blk.c
parentc00895ab2f08df7044e58ee01c38bf0a661ea0eb (diff)
downloadmrst-s0i3-test-49171e5c6f414d49a061b5c1c84967c2eb569822.tar.gz
mrst-s0i3-test-49171e5c6f414d49a061b5c1c84967c2eb569822.tar.xz
mrst-s0i3-test-49171e5c6f414d49a061b5c1c84967c2eb569822.zip
[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/ll_rw_blk.c')
-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 3b6aad2affd..f7462502bfd 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)
rq->elevator_private = NULL;
rq->elevator_private2 = NULL;
rq->rq_disk = q->bar_rq.rq_disk;
- rq->rl = NULL;
rq->end_io = end_io;
q->prepare_flush_fn(q, rq);
@@ -480,7 +479,6 @@ static inline struct request *start_ordered(request_queue_t *q,
rq->cmd_flags |= q->ordered & QUEUE_ORDERED_FUA ? REQ_FUA : 0;
rq->elevator_private = NULL;
rq->elevator_private2 = NULL;
- rq->rl = NULL;
init_request_from_bio(rq, q->orig_bar_rq->bio);
rq->end_io = bar_end_io;
@@ -2018,7 +2016,7 @@ blk_alloc_request(request_queue_t *q, int rw, struct bio *bio,
* first three bits are identical in rq->cmd_flags and bio->bi_rw,
* see bio.h and blkdev.h
*/
- rq->cmd_flags = rw;
+ rq->cmd_flags = rw | REQ_ALLOCED;
if (priv) {
if (unlikely(elv_set_request(q, rq, bio, gfp_mask))) {
@@ -2196,7 +2194,6 @@ rq_starved:
ioc->nr_batch_requests--;
rq_init(q, rq);
- rq->rl = rl;
blk_add_trace_generic(q, bio, rw, BLK_TA_GETRQ);
out:
@@ -2681,8 +2678,6 @@ EXPORT_SYMBOL_GPL(disk_round_stats);
*/
void __blk_put_request(request_queue_t *q, struct request *req)
{
- struct request_list *rl = req->rl;
-
if (unlikely(!q))
return;
if (unlikely(--req->ref_count))
@@ -2691,13 +2686,12 @@ void __blk_put_request(request_queue_t *q, struct request *req)
elv_completed_request(q, req);
req->rq_status = RQ_INACTIVE;
- req->rl = NULL;
/*
* Request may not have originated from ll_rw_blk. if not,
* it didn't come out of our reserved rq pools
*/
- if (rl) {
+ if (req->cmd_flags & REQ_ALLOCED) {
int rw = rq_data_dir(req);
int priv = req->cmd_flags & REQ_ELVPRIV;