aboutsummaryrefslogtreecommitdiffstats
path: root/block/blk-core.c
diff options
context:
space:
mode:
authorFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2008-04-29 03:54:36 -0400
committerJens Axboe <jens.axboe@oracle.com>2008-04-29 08:48:55 -0400
commit2a4aa30c5f967eb6ae874c67fa6fceeee84815f9 (patch)
treefddd67e3b3697874e2a19c0e8e194190957b0e1e /block/blk-core.c
parent992b5bceee447a32ef2d617730ae0d03c063eedd (diff)
block: rename and export rq_init()
This rename rq_init() blk_rq_init() and export it. Any path that hands the request to the block layer needs to call it to initialize the request. This is a preparation for large command support, which needs to initialize the 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> Cc: Jens Axboe <jens.axboe@oracle.com> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'block/blk-core.c')
-rw-r--r--block/blk-core.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/block/blk-core.c b/block/blk-core.c
index d2f23ec5ebfa..fe0d1390b743 100644
--- a/block/blk-core.c
+++ b/block/blk-core.c
@@ -107,7 +107,7 @@ struct backing_dev_info *blk_get_backing_dev_info(struct block_device *bdev)
107} 107}
108EXPORT_SYMBOL(blk_get_backing_dev_info); 108EXPORT_SYMBOL(blk_get_backing_dev_info);
109 109
110void rq_init(struct request_queue *q, struct request *rq) 110void blk_rq_init(struct request_queue *q, struct request *rq)
111{ 111{
112 memset(rq, 0, sizeof(*rq)); 112 memset(rq, 0, sizeof(*rq));
113 113
@@ -120,6 +120,7 @@ void rq_init(struct request_queue *q, struct request *rq)
120 rq->tag = -1; 120 rq->tag = -1;
121 rq->ref_count = 1; 121 rq->ref_count = 1;
122} 122}
123EXPORT_SYMBOL(blk_rq_init);
123 124
124static void req_bio_endio(struct request *rq, struct bio *bio, 125static void req_bio_endio(struct request *rq, struct bio *bio,
125 unsigned int nbytes, int error) 126 unsigned int nbytes, int error)
@@ -598,7 +599,7 @@ blk_alloc_request(struct request_queue *q, int rw, int priv, gfp_t gfp_mask)
598 if (!rq) 599 if (!rq)
599 return NULL; 600 return NULL;
600 601
601 rq_init(q, rq); 602 blk_rq_init(q, rq);
602 603
603 /* 604 /*
604 * first three bits are identical in rq->cmd_flags and bio->bi_rw, 605 * first three bits are identical in rq->cmd_flags and bio->bi_rw,