summaryrefslogtreecommitdiffstats
path: root/block/blk-core.c
diff options
context:
space:
mode:
authorFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2008-04-29 09:54:36 +0200
committerJens Axboe <jens.axboe@oracle.com>2008-04-29 14:48:55 +0200
commit2a4aa30c5f967eb6ae874c67fa6fceeee84815f9 (patch)
treefddd67e3b3697874e2a19c0e8e194190957b0e1e /block/blk-core.c
parent992b5bceee447a32ef2d617730ae0d03c063eedd (diff)
downloadlinux-2a4aa30c5f967eb6ae874c67fa6fceeee84815f9.tar.gz
linux-2a4aa30c5f967eb6ae874c67fa6fceeee84815f9.tar.xz
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)
}
EXPORT_SYMBOL(blk_get_backing_dev_info);
-void rq_init(struct request_queue *q, struct request *rq)
+void blk_rq_init(struct request_queue *q, struct request *rq)
{
memset(rq, 0, sizeof(*rq));
@@ -120,6 +120,7 @@ void rq_init(struct request_queue *q, struct request *rq)
rq->tag = -1;
rq->ref_count = 1;
}
+EXPORT_SYMBOL(blk_rq_init);
static void req_bio_endio(struct request *rq, struct bio *bio,
unsigned int nbytes, int error)
@@ -598,7 +599,7 @@ blk_alloc_request(struct request_queue *q, int rw, int priv, gfp_t gfp_mask)
if (!rq)
return NULL;
- rq_init(q, rq);
+ blk_rq_init(q, rq);
/*
* first three bits are identical in rq->cmd_flags and bio->bi_rw,