All of lore.kernel.org
 help / color / mirror / Atom feed
* [dm-devel] Patch "dm-crypt: provide dma_alignment limit in io_hints" has been added to the 6.0-stable tree
@ 2022-11-21  5:09 Sasha Levin
  0 siblings, 0 replies; only message in thread
From: Sasha Levin @ 2022-11-21  5:09 UTC (permalink / raw)
  To: stable-commits, kbusch; +Cc: dm-devel, Mike Snitzer, Alasdair Kergon

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@vger.kernel.org> know about it.



commit e6bb09b02e87cbde45c6d2692fb710579a08c366
Author: Keith Busch <kbusch@kernel.org>
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@xps.demsh.org/
    Fixes: b1a000d3b8ec5 ("block: relax direct io memory alignment")
    Reportred-by: Eric Biggers <ebiggers@kernel.org>
    Reported-by: Dmitrii Tcvetkov <me@demsh.org>
    Signed-off-by: Keith Busch <kbusch@kernel.org>
    Reviewed-by: Mike Snitzer <snitzer@kernel.org>
    Link: https://lore.kernel.org/r/20221110184501.2451620-3-kbusch@meta.com
    Signed-off-by: Jens Axboe <axboe@kernel.dk>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

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 = {

--
dm-devel mailing list
dm-devel@redhat.com
https://listman.redhat.com/mailman/listinfo/dm-devel


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2022-11-21  5:09 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-21  5:09 [dm-devel] Patch "dm-crypt: provide dma_alignment limit in io_hints" has been added to the 6.0-stable tree Sasha Levin

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.