From: "Matias Bjørling" <m@bjorling.me>
To: hch@infradead.org, axboe@fb.com, linux-fsdevel@vger.kernel.org,
linux-kernel@vger.kernel.org
Cc: thornber@redhat.com, bvanassche@acm.org, jmad@itu.dk,
"Matias Bjørling" <m@bjorling.me>
Subject: [RPC PATCH 1/5] block: expose init_request_from_bio
Date: Tue, 18 Nov 2014 20:41:55 +0100 [thread overview]
Message-ID: <1416339719-8488-2-git-send-email-m@bjorling.me> (raw)
In-Reply-To: <1416339719-8488-1-git-send-email-m@bjorling.me>
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@bjorling.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
next prev parent reply other threads:[~2014-11-18 19:42 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-18 19:41 [RPC PATCH 0/5] Support for Open-Channel SSDs Matias Bjørling
2014-11-18 19:41 ` Matias Bjørling [this message]
2014-11-18 19:41 ` [RPC PATCH 2/5] block: extend rq_flag_bits Matias Bjørling
2014-11-18 19:41 ` [RFC PATCH 3/5] lightnvm: Support for Open-Channel SSDs Matias Bjørling
2014-11-18 19:41 ` [RFC PATCH 4/5] nvme: LightNVM integration Matias Bjørling
2014-11-18 19:41 ` [RFC PATCH 5/5] null_blk: " Matias Bjørling
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1416339719-8488-2-git-send-email-m@bjorling.me \
--to=m@bjorling.me \
--cc=axboe@fb.com \
--cc=bvanassche@acm.org \
--cc=hch@infradead.org \
--cc=jmad@itu.dk \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=thornber@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®