Linux Device Mapper development
 help / color / mirror / Atom feed
From: Keith Busch <keith.busch@intel.com>
To: dm-devel@redhat.com
Cc: Christoph Hellwig <hch@infradead.org>,
	Jun'ichi Nomura <j-nomura@ce.jp.nec.com>,
	Keith Busch <keith.busch@intel.com>,
	Mike Snitzer <snitzer@redhat.com>
Subject: [PATCHv2 1/4] dm: prep initialized requests
Date: Fri, 17 Oct 2014 17:46:35 -0600	[thread overview]
Message-ID: <1413589598-17631-2-git-send-email-keith.busch@intel.com> (raw)
In-Reply-To: <1413589598-17631-1-git-send-email-keith.busch@intel.com>

Require blk_rq_prep_clone use requests that have already been
initialized. This patch is preping to allow this path to accept requests
allocated from blk-mq request queues.

Signed-off-by: Keith Busch <keith.busch@intel.com>
---
 block/blk-core.c |    2 --
 drivers/md/dm.c  |    1 +
 2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/block/blk-core.c b/block/blk-core.c
index bf930f4..3abbc04 100644
--- a/block/blk-core.c
+++ b/block/blk-core.c
@@ -2928,8 +2928,6 @@ int blk_rq_prep_clone(struct request *rq, struct request *rq_src,
 	if (!bs)
 		bs = fs_bio_set;
 
-	blk_rq_init(NULL, rq);
-
 	__rq_for_each_bio(bio_src, rq_src) {
 		bio = bio_clone_bioset(bio_src, gfp_mask, bs);
 		if (!bio)
diff --git a/drivers/md/dm.c b/drivers/md/dm.c
index 32b958d..809f83f 100644
--- a/drivers/md/dm.c
+++ b/drivers/md/dm.c
@@ -1605,6 +1605,7 @@ static int setup_clone(struct request *clone, struct request *rq,
 {
 	int r;
 
+	blk_rq_init(NULL, rq);
 	r = blk_rq_prep_clone(clone, rq, tio->md->bs, GFP_ATOMIC,
 			      dm_rq_bio_constructor, tio);
 	if (r)
-- 
1.7.10.4

  reply	other threads:[~2014-10-17 23:46 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-17 23:46 [PATCHv2 0/4] blk-mq support for dm multipath Keith Busch
2014-10-17 23:46 ` Keith Busch [this message]
2014-10-17 23:46 ` [PATCHv2 2/4] dm: Submit stacked requests in irq enabled context Keith Busch
2014-10-17 23:46 ` [PATCHv2 3/4] dm: Move request allocation to dm_target type Keith Busch
2014-10-17 23:46 ` [PATCHv2 4/4] block: blk-mq support for cloned requests Keith Busch
2014-10-28 18:13 ` [PATCHv2 0/4] blk-mq support for dm multipath Keith Busch
2014-10-28 18:26   ` Mike Snitzer
2014-12-05 23:25     ` Mike Snitzer
2014-12-05 23:33       ` Keith Busch
2014-12-06  0:35         ` Mike Snitzer
2014-12-06  5:53       ` Mike Snitzer
2014-12-06  6:09         ` Mike Snitzer
2014-12-13  2:08           ` Mike Snitzer
2014-10-28 18:48   ` Hannes Reinecke

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=1413589598-17631-2-git-send-email-keith.busch@intel.com \
    --to=keith.busch@intel.com \
    --cc=dm-devel@redhat.com \
    --cc=hch@infradead.org \
    --cc=j-nomura@ce.jp.nec.com \
    --cc=snitzer@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