summaryrefslogtreecommitdiffstats
path: root/block/blk-barrier.c
diff options
context:
space:
mode:
authorFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2008-04-25 12:26:28 +0200
committerJens Axboe <jens.axboe@oracle.com>2008-04-29 09:50:34 +0200
commit1afb20f30151dd4160877c827f5b7203f98627fb (patch)
tree066e99694fbf0396ccd6b2a15e59747a81869f04 /block/blk-barrier.c
parentc3270e577c18b3d0e984c3371493205a4807db9d (diff)
downloadkernel-crypto-1afb20f30151dd4160877c827f5b7203f98627fb.tar.gz
kernel-crypto-1afb20f30151dd4160877c827f5b7203f98627fb.tar.xz
kernel-crypto-1afb20f30151dd4160877c827f5b7203f98627fb.zip
block: make rq_init() do a full memset()
This requires moving rq_init() from get_request() to blk_alloc_request(). The upside is that we can now require an rq_init() from any path that wishes to hand the request to the block layer. rq_init() will be exported for the code that uses struct request without blk_get_request. This is a preparation for large command support, which needs to initialize struct request in a proper way (that is, just doing a memset() will not work). Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'block/blk-barrier.c')
-rw-r--r--block/blk-barrier.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/block/blk-barrier.c b/block/blk-barrier.c
index 55c5f1fc4f1..722140ac175 100644
--- a/block/blk-barrier.c
+++ b/block/blk-barrier.c
@@ -143,10 +143,8 @@ static void queue_flush(struct request_queue *q, unsigned which)
end_io = post_flush_end_io;
}
- rq->cmd_flags = REQ_HARDBARRIER;
rq_init(q, rq);
- rq->elevator_private = NULL;
- rq->elevator_private2 = NULL;
+ rq->cmd_flags = REQ_HARDBARRIER;
rq->rq_disk = q->bar_rq.rq_disk;
rq->end_io = end_io;
q->prepare_flush_fn(q, rq);
@@ -167,14 +165,11 @@ static inline struct request *start_ordered(struct request_queue *q,
blkdev_dequeue_request(rq);
q->orig_bar_rq = rq;
rq = &q->bar_rq;
- rq->cmd_flags = 0;
rq_init(q, rq);
if (bio_data_dir(q->orig_bar_rq->bio) == WRITE)
rq->cmd_flags |= REQ_RW;
if (q->ordered & QUEUE_ORDERED_FUA)
rq->cmd_flags |= REQ_FUA;
- rq->elevator_private = NULL;
- rq->elevator_private2 = NULL;
init_request_from_bio(rq, q->orig_bar_rq->bio);
rq->end_io = bar_end_io;