Patch "block: fix blk_integrity_register to use template's interval_exp if not 0" has been added to the 4.4-stable tree
Subsystems (2)
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.4-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.4 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From
2859323e35ab5fc42f351fbda23ab544eaa85945Mon Sep 17 00:00:00 2001
From: Mike Snitzer <[email protected]>
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 <[email protected]>
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.
--- block/blk-integrity.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
block/blk-integrity.c +2 -1
@@ -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 [email protected] are
queue-4.4/block-fix-blk_integrity_register-to-use-template-s-interval_exp-if-not-0.patch queue-4.4/dm-era-save-spacemap-metadata-root-after-the-pre-commit.patch