mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Nicholas A. Bellinger" <nab@linux-iscsi.org>
To: Christoph Hellwig <hch@infradead.org>
Cc: Jens Axboe <axboe@kernel.dk>,
	linux-kernel@vger.kernel.org, linux-scsi@vger.kernel.org
Subject: Re: [PATCH 0/4] minor blk-mq updates
Date: Fri, 07 Feb 2014 11:36:45 -0800	[thread overview]
Message-ID: <1391801805.1155.30.camel@haakon3.risingtidesystems.com> (raw)
In-Reply-To: <20140207182235.659185141@bombadil.infradead.org>

On Fri, 2014-02-07 at 10:22 -0800, Christoph Hellwig wrote:
> Hi Jens,
> 
> these small blk-mq core updates fell out of the scsi multiqueue work.

That reminds me, the following blk-mq patch was required to get DIF
working with scsi-mq.

Jens, care to pick this up as well..?

--nab

>From 1428a390cc16025f93905852777d4afd8aeba05d Mon Sep 17 00:00:00 2001
From: Nicholas Bellinger <nab@linux-iscsi.org>
Date: Sun, 22 Dec 2013 11:58:49 +0000
Subject: blk-mq: Add bio_integrity setup to blk_mq_make_request

This patch adds the missing bio_integrity_enabled() +
bio_integrity_prep() setup into blk_mq_make_request()
in order to use DIF protection with scsi-mq.

Cc: Jens Axboe <axboe@kernel.dk>
Cc: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
---
diff --git a/block/blk-mq.c b/block/blk-mq.c
index c79126e..a520c39 100644
--- a/block/blk-mq.c
+++ b/block/blk-mq.c
@@ -916,6 +916,11 @@ static void blk_mq_make_request(struct request_queue *q, struct bio *bio)
 
 	blk_queue_bounce(q, &bio);
 
+	if (bio_integrity_enabled(bio) && bio_integrity_prep(bio)) {
+		bio_endio(bio, -EIO);
+		return;
+	}
+
 	if (use_plug && blk_attempt_plug_merge(q, bio, &request_count))
 		return;
 


  parent reply	other threads:[~2014-02-07 19:34 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-07 18:22 Christoph Hellwig
2014-02-07 18:22 ` [PATCH 1/4] blk-mq: support at_head inserations for blk_execute_rq Christoph Hellwig
2014-02-07 18:22 ` [PATCH 2/4] blk-mq: divert __blk_put_request for MQ ops Christoph Hellwig
2014-02-07 18:22 ` [PATCH 3/4] blk-mq: handle dma_drain_size Christoph Hellwig
2014-02-07 18:22 ` [PATCH 4/4] blk-mq: initialize sg_reserved_size Christoph Hellwig
2014-02-07 18:59 ` [PATCH 0/4] minor blk-mq updates Jens Axboe
2014-02-07 19:36 ` Nicholas A. Bellinger [this message]
2014-02-07 20:45   ` Jens Axboe

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=1391801805.1155.30.camel@haakon3.risingtidesystems.com \
    --to=nab@linux-iscsi.org \
    --cc=axboe@kernel.dk \
    --cc=hch@infradead.org \
    --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 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®