linux-block.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCHv2 0/2] dm-crypt: support relaxed memory alignment
@ 2025-11-24 17:09 Keith Busch
  2025-11-24 17:09 ` [PATCHv2 1/3] block: remove stacking default dma_alignment Keith Busch
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Keith Busch @ 2025-11-24 17:09 UTC (permalink / raw)
  To: dm-devel, linux-block, snitzer, hch, axboe, ebiggers; +Cc: Keith Busch

From: Keith Busch <kbusch@kernel.org>

Direct-io can support any memory alignment the hardware allows. Device
mappers don't need to impose any software constraints on memory
alignment, so this series removes one of those limitations.

Changes from the v1, which was an incomplete RFC:

 * A block layer prep patch to allow stacking drivers to define their
   own lower dma alignment limit.

 * Prevent reporting the relaxed alignment for any of the initialization
   vector types that use the scatterlist for other purposes beyond
   encrypt/decrypt.

 * Keep the error handling for data that unaligned data, but instead
   using the block device's queue limits.

 * Use the same scatterlist setup for both the in and out vectors.

 * Use multipage bvecs.

 * Check the alignment as the scatterlist is being built.

 * A follow up patch provides support for dynamic scatterlist allocation
   when the base bio has a lot fragmented segments. 

Keith Busch (3):
  block: remove stacking default dma_alignment
  dm-crypt: allow unaligned bio_vecs for direct io
  dm-crypt: dynamic scatterlist for many segments

 block/blk-settings.c  |   1 -
 drivers/md/dm-crypt.c | 105 ++++++++++++++++++++++++++++++++++--------
 2 files changed, 86 insertions(+), 20 deletions(-)

-- 
2.47.3


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2025-11-28  6:16 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-24 17:09 [PATCHv2 0/2] dm-crypt: support relaxed memory alignment Keith Busch
2025-11-24 17:09 ` [PATCHv2 1/3] block: remove stacking default dma_alignment Keith Busch
2025-11-24 17:12   ` Christoph Hellwig
2025-11-25  2:49     ` Keith Busch
2025-11-25  6:35       ` Christoph Hellwig
2025-11-24 17:09 ` [PATCHv2 2/3] dm-crypt: allow unaligned bio_vecs for direct io Keith Busch
2025-11-24 17:09 ` [PATCHv2 3/3] dm-crypt: dynamic scatterlist for many segments Keith Busch
2025-11-28  6:15   ` Dan Carpenter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).