Skip to content
Commit 464b609d authored by Martin K. Petersen's avatar Martin K. Petersen Committed by Greg Kroah-Hartman
Browse files

block: bio-integrity: Advance seed correctly for larger interval sizes

commit b13e0c71 upstream.

Commit 309a62fa ("bio-integrity: bio_integrity_advance must update
integrity seed") added code to update the integrity seed value when
advancing a bio. However, it failed to take into account that the
integrity interval might be larger than the 512-byte block layer
sector size. This broke bio splitting on PI devices with 4KB logical
blocks.

The seed value should be advanced by bio_integrity_intervals() and not
the number of sectors.

Cc: Dmitry Monakhov <dmonakhov@openvz.org>
Cc: stable@vger.kernel.org
Fixes: 309a62fa

 ("bio-integrity: bio_integrity_advance must update integrity seed")
Tested-by: default avatarDmitry Ivanov <dmitry.ivanov2@hpe.com>
Reported-by: default avatarAlexey Lyashkov <alexey.lyashkov@hpe.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
Link: https://lore.kernel.org/r/20220204034209.4193-1-martin.petersen@oracle.com


Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent cebb0ace
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment