Skip to contentSkip to conversation

Patch "dm-crypt: provide dma_alignment limit in io_hints" has been added to the 6.0-stable tree

dm-devel Sasha Levin 1 participant 1 message Nov 21, 2022 Device mapper

lore
Share & tools
lore

Sasha Levin

author Applied
#0 lore raw

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 <[email protected]> know about it.

commit e6bb09b02e87cbde45c6d2692fb710579a08c366

Author: Keith Busch <[email protected]>
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.

drivers/md/dm-crypt.c +1 -0
index 159c6806c19b..2653516bcdef 100644
@@ -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 = {

--
dm-devel mailing list
[email protected]
https://listman.redhat.com/mailman/listinfo/dm-devel