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: "Martin K. Petersen" <martin.petersen@oracle.com>,
	Jens Axboe <axboe@kernel.dk>,
	linux-kernel@vger.kernel.org, linux-scsi@vger.kernel.org
Subject: Re: status of block-integrity
Date: Sun, 22 Dec 2013 12:45:55 -0800	[thread overview]
Message-ID: <1387745155.5567.96.camel@haakon3.risingtidesystems.com> (raw)
In-Reply-To: <20131222192128.GA28532@infradead.org>

On Sun, 2013-12-22 at 11:21 -0800, Christoph Hellwig wrote:
> We have the block integrity code to support DIF/DIX in the the tree for
> about 5 and a half years, and we still don't have a single consumer of
> it.  By normal kernel rules it should never have been merged, or at
> least the bitrot long removed.

Is not sd_dif.c a consumer of blk_integrity.c logic..?

> Given that we'll have a lot of work to do in this area with block
> multiqueue I think it's time to either kill it off for good or make sure
> we can actually use and test it.

Speak of the devil..

I've been working on enabling DIF support in scsi-mq recently, and
AFAICT the only part that is required in blk-mq for DIF emulation to
function with scsi-debug is the following patch.

commit 1428a390cc16025f93905852777d4afd8aeba05d
Author: Nicholas Bellinger <nab@linux-iscsi.org>
Date:   Sun Dec 22 11:58:49 2013 +0000

    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;


  reply	other threads:[~2013-12-22 20:44 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-22 19:21 Christoph Hellwig
2013-12-22 20:45 ` Nicholas A. Bellinger [this message]
2013-12-23 13:35 ` Martin K. Petersen
2013-12-23 13:48   ` Christoph Hellwig
2013-12-31 19:41   ` berthiaume, wayne
2014-01-07  8:28   ` Ric Wheeler
2014-01-07 13:33     ` Hannes Reinecke
2014-01-07 23:34       ` Matthew Wilcox
2014-01-08  0:05         ` James Bottomley
2014-01-08 15:43           ` Martin K. Petersen
2014-01-03 15:01 ` Hannes Reinecke
2014-01-03 20:03   ` Martin K. Petersen
2014-01-07  1:36     ` Darrick J. Wong
2014-01-07  7:17       ` Hannes Reinecke
2014-01-07 21:43         ` Martin K. Petersen
2014-01-08  7:14           ` Hannes Reinecke
2014-01-08 15:23             ` Martin K. Petersen
2014-01-09 11:19               ` Hannes Reinecke
2014-01-10  1:49                 ` Martin K. Petersen
2014-01-07 15:06       ` Chuck Lever

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=1387745155.5567.96.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 \
    --cc=martin.petersen@oracle.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®