This is a note to let you know that I've just added the patch titled dm-crypt: provide dma_alignment limit in io_hints to the 6.0-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: dm-crypt-provide-dma_alignment-limit-in-io_hints.patch and it can be found in the queue-6.0 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. commit e6bb09b02e87cbde45c6d2692fb710579a08c366 Author: Keith Busch <kbusch@xxxxxxxxxx> Date: Thu Nov 10 10:44:58 2022 -0800 dm-crypt: provide dma_alignment limit in io_hints [ Upstream commit 86e4d3e8d1838ca88fb9267e669c36f6c8f7c6cd ] This device mapper needs bio vectors to be sized and memory aligned to the logical block size. Set the minimum required queue limit accordingly. Link: https://lore.kernel.org/linux-block/20221101001558.648ee024@xxxxxxxxxxxxx/ Fixes: b1a000d3b8ec5 ("block: relax direct io memory alignment") Reportred-by: Eric Biggers <ebiggers@xxxxxxxxxx> Reported-by: Dmitrii Tcvetkov <me@xxxxxxxxx> Signed-off-by: Keith Busch <kbusch@xxxxxxxxxx> Reviewed-by: Mike Snitzer <snitzer@xxxxxxxxxx> Link: https://lore.kernel.org/r/20221110184501.2451620-3-kbusch@xxxxxxxx Signed-off-by: Jens Axboe <axboe@xxxxxxxxx> Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx> diff --git a/drivers/md/dm-crypt.c b/drivers/md/dm-crypt.c index 159c6806c19b..2653516bcdef 100644 --- a/drivers/md/dm-crypt.c +++ b/drivers/md/dm-crypt.c @@ -3630,6 +3630,7 @@ static void crypt_io_hints(struct dm_target *ti, struct queue_limits *limits) limits->physical_block_size = max_t(unsigned, limits->physical_block_size, cc->sector_size); limits->io_min = max_t(unsigned, limits->io_min, cc->sector_size); + limits->dma_alignment = limits->logical_block_size - 1; } static struct target_type crypt_target = {