From: <gregkh@linuxfoundation.org>
To: snitzer@redhat.com, axboe@fb.com, gregkh@linuxfoundation.org,
martin.petersen@oracle.com, mpatocka@redhat.com
Cc: <stable@vger.kernel.org>, <stable-commits@vger.kernel.org>
Subject: Patch "block: fix blk_integrity_register to use template's interval_exp if not 0" has been added to the 4.11-stable tree
Date: Tue, 16 May 2017 12:50:48 +0200 [thread overview]
Message-ID: <14949318489990@kroah.com> (raw)
This is a note to let you know that I've just added the patch titled
block: fix blk_integrity_register to use template's interval_exp if not 0
to the 4.11-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
block-fix-blk_integrity_register-to-use-template-s-interval_exp-if-not-0.patch
and it can be found in the queue-4.11 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.
>From 2859323e35ab5fc42f351fbda23ab544eaa85945 Mon Sep 17 00:00:00 2001
From: Mike Snitzer <snitzer@redhat.com>
Date: Sat, 22 Apr 2017 17:22:09 -0400
Subject: block: fix blk_integrity_register to use template's interval_exp if not 0
From: Mike Snitzer <snitzer@redhat.com>
commit 2859323e35ab5fc42f351fbda23ab544eaa85945 upstream.
When registering an integrity profile: if the template's interval_exp is
not 0 use it, otherwise use the ilog2() of logical block size of the
provided gendisk.
This fixes a long-standing DM linear target bug where it cannot pass
integrity data to the underlying device if its logical block size
conflicts with the underlying device's logical block size.
Reported-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Acked-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
block/blk-integrity.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--- a/block/blk-integrity.c
+++ b/block/blk-integrity.c
@@ -412,7 +412,8 @@ void blk_integrity_register(struct gendi
bi->flags = BLK_INTEGRITY_VERIFY | BLK_INTEGRITY_GENERATE |
template->flags;
- bi->interval_exp = ilog2(queue_logical_block_size(disk->queue));
+ bi->interval_exp = template->interval_exp ? :
+ ilog2(queue_logical_block_size(disk->queue));
bi->profile = template->profile ? template->profile : &nop_profile;
bi->tuple_size = template->tuple_size;
bi->tag_size = template->tag_size;
Patches currently in stable-queue which might be from snitzer@redhat.com are
queue-4.11/block-fix-blk_integrity_register-to-use-template-s-interval_exp-if-not-0.patch
queue-4.11/dm-crypt-rewrite-wipe-key-in-crypto-layer-using-random-data.patch
queue-4.11/dm-era-save-spacemap-metadata-root-after-the-pre-commit.patch
queue-4.11/dm-rq-check-blk_mq_register_dev-return-value-in-dm_mq_init_request_queue.patch
queue-4.11/dm-thin-fix-a-memory-leak-when-passing-discard-bio-down.patch
reply other threads:[~2017-05-16 10:50 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=14949318489990@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=axboe@fb.com \
--cc=martin.petersen@oracle.com \
--cc=mpatocka@redhat.com \
--cc=snitzer@redhat.com \
--cc=stable-commits@vger.kernel.org \
--cc=stable@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;
as well as URLs for NNTP newsgroup(s).