Skip to content

dm-crypt: finer grained memory alignment

Keith Busch dm-devel linux-block 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v5 Latest3 patches 4 repliesIn review
  2. v42 patches 3 repliesSuperseded

Changes in v5 from the cover letter

* Updated the mempool count to MIN_IOS, as requested.

* Fixed the issue observed from cryptsetup testsuite. The problem was an early return path accessing unitialized fields. The fix just initializes them before.

* I discovered we may be in softirq context when allocating, so had to add handling for ENOMEM. But then also noticed existing ENOMEM cases were just being generically handled in the default case returning EIO, so I introduced a prep patch to make these transient resource issues retryable.

Patches in v5 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3dm: initialize dma_alignment to 0drivers/md/dm-table.c+1 -08 replies
2/3dm-crypt: handle memory allocation failuresdrivers/md/dm-crypt.c+19 -50 replies
3/3dm-crypt: allow unaligned bio_vecs for direct iodrivers/md/dm-crypt.c+140 -214 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v5 yet.

Read the v5 thread

Cover letter [PATCHv5 0/3] dm-crypt: finer grained memory alignment

From: Keith Busch <[email protected]>

This is the updated series for allowing arbitrary memory alignment, enabling direct-io without bounce buffers for dm-crypt.

The previous version was posted here:

https://lore.kernel.org/dm-devel/[email protected]/

Changes from v4:

* Updated the mempool count to MIN_IOS, as requested.

* Fixed the issue observed from cryptsetup testsuite. The problem was an early return path accessing unitialized fields. The fix just initializes them before.

* I discovered we may be in softirq context when allocating, so had to add handling for ENOMEM. But then also noticed existing ENOMEM cases were just being generically handled in the default case returning EIO, so I introduced a prep patch to make these transient resource issues retryable.

Keith Busch (3):
dm: initialize dma_alignment to 0
dm-crypt: handle memory allocation failures
dm-crypt: allow unaligned bio_vecs for direct io

 drivers/md/dm-crypt.c | 183 ++++++++++++++++++++++++++++++++++++------
 drivers/md/dm-table.c |   1 +
 2 files changed, 159 insertions(+), 25 deletions(-)
Signature · 1 line
2.52.0