[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1416339719-8488-2-git-send-email-m@bjorling.me>
Date: Tue, 18 Nov 2014 20:41:55 +0100
From: Matias Bjørling <m@...rling.me>
To: hch@...radead.org, axboe@...com, linux-fsdevel@...r.kernel.org,
linux-kernel@...r.kernel.org
Cc: thornber@...hat.com, bvanassche@....org, jmad@....dk,
Matias Bjørling <m@...rling.me>
Subject: [RPC PATCH 1/5] block: expose init_request_from_bio
When doing internal commands within LightNVM, we may form it as a bio.
It can then use the existing infrastructure for handling bio's.
Expose init_request_from_bio as blk_init_request_from_bio and allow
requests to initialized from bio's.
Signed-off-by: Matias Bjørling <m@...rling.me>
---
block/blk-core.c | 6 ++++++
include/linux/blkdev.h | 1 +
2 files changed, 7 insertions(+)
diff --git a/block/blk-core.c b/block/blk-core.c
index bf930f4..53f9488 100644
--- a/block/blk-core.c
+++ b/block/blk-core.c
@@ -1546,6 +1546,12 @@ void init_request_from_bio(struct request *req, struct bio *bio)
blk_rq_bio_prep(req->q, req, bio);
}
+void blk_init_request_from_bio(struct request *req, struct bio *bio)
+{
+ init_request_from_bio(req, bio);
+}
+EXPORT_SYMBOL(blk_init_request_from_bio);
+
void blk_queue_bio(struct request_queue *q, struct bio *bio)
{
const bool sync = !!(bio->bi_rw & REQ_SYNC);
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
index 518b465..75296c0 100644
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
@@ -823,6 +823,7 @@ extern int sg_scsi_ioctl(struct request_queue *, struct gendisk *, fmode_t,
struct scsi_ioctl_command __user *);
extern void blk_queue_bio(struct request_queue *q, struct bio *bio);
+extern void blk_init_request_from_bio(struct request *req, struct bio *bio);
/*
* A queue has just exitted congestion. Note this in the global counter of
--
1.9.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists