All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ming Lei <ming.lei@canonical.com>
To: Jens Axboe <axboe@kernel.dk>, linux-kernel@vger.kernel.org
Cc: linux-scsi@vger.kernel.org, Christoph Hellwig <hch@lst.de>,
	Ming Lei <ming.lei@canonical.com>
Subject: [PATCH 6/6] blk-mq: don't copy pdu any more for flush req
Date: Sun,  7 Sep 2014 16:39:22 +0800	[thread overview]
Message-ID: <1410079162-9872-7-git-send-email-ming.lei@canonical.com> (raw)
In-Reply-To: <1410079162-9872-1-git-send-email-ming.lei@canonical.com>

The in-tree drivers which need to handle flush request
have implemented init_flush_rq already, so don't
copy pdu any more for flush req.

Signed-off-by: Ming Lei <ming.lei@canonical.com>
---
 block/blk-mq.c |    7 -------
 1 file changed, 7 deletions(-)

diff --git a/block/blk-mq.c b/block/blk-mq.c
index 113d58d..16f595f 100644
--- a/block/blk-mq.c
+++ b/block/blk-mq.c
@@ -287,15 +287,8 @@ void blk_mq_free_request(struct request *rq)
 void blk_mq_clone_flush_request(struct request *flush_rq,
 		struct request *orig_rq)
 {
-	struct blk_mq_hw_ctx *hctx =
-		orig_rq->q->mq_ops->map_queue(orig_rq->q, orig_rq->mq_ctx->cpu);
-
 	flush_rq->mq_ctx = orig_rq->mq_ctx;
 	flush_rq->tag = orig_rq->tag;
-
-	if (!orig_rq->q->mq_ops->init_flush_rq)
-		memcpy(blk_mq_rq_to_pdu(flush_rq),
-			blk_mq_rq_to_pdu(orig_rq), hctx->cmd_size);
 }
 
 inline void __blk_mq_end_io(struct request *rq, int error)
-- 
1.7.9.5


  parent reply	other threads:[~2014-09-07  8:39 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-07  8:39 [PATCH 0/6] blk-mq: initialize pdu of flush req explicitly Ming Lei
2014-09-07  8:39 ` [PATCH 1/6] blk-mq: allocate flush_rq in blk_mq_init_flush() Ming Lei
2014-09-07  8:39 ` [PATCH 2/6] blk-mq: introduce init_flush_rq callback and its pair Ming Lei
2014-09-07  8:39 ` [PATCH 3/6] blk-mq: don't copy pdu if init_flush_rq is implemented Ming Lei
2014-09-07  8:39 ` [PATCH 4/6] virtio-blk: implement init_flush_rq Ming Lei
2014-09-07 18:52   ` Christoph Hellwig
2014-09-07  8:39 ` [PATCH 5/6] scsi-lib: implement init_flush_rq and its pair Ming Lei
2014-09-07 18:53   ` Christoph Hellwig
2014-09-07  8:39 ` Ming Lei [this message]
2014-09-07 18:49 ` [PATCH 0/6] blk-mq: initialize pdu of flush req explicitly Christoph Hellwig
2014-09-08 16:55   ` Ming Lei
2014-09-08 19:03     ` Jens Axboe
2014-09-08 22:53     ` Elliott, Robert (Server Storage)
2014-09-08 22:53       ` Elliott, Robert (Server Storage)

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=1410079162-9872-7-git-send-email-ming.lei@canonical.com \
    --to=ming.lei@canonical.com \
    --cc=axboe@kernel.dk \
    --cc=hch@lst.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.