All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] fix direct io errors on dm-crypt
@ 2022-11-03 15:25 ` Keith Busch
  0 siblings, 0 replies; 24+ messages in thread
From: Keith Busch @ 2022-11-03 15:25 UTC (permalink / raw)
  To: linux-block, dm-devel, axboe
  Cc: stefanha, ebiggers, me, mpatocka, Keith Busch

From: Keith Busch <kbusch@kernel.org>

The 6.0 kernel made some changes to the direct io interface to allow
offsets in user addresses. This based on the hardware's capabilities
reported in the request_queue's dma_alignment attribute.

dm-crypt requires direct io be aligned to the block size. Since it was
only ever using the default 511 dma mask, this requirement may fail if
formatted to something larger, like 4k, which will result in unexpected
behavior with direct-io.

There are two parts to fixing this:

  First, the attribute needs to be moved to the queue_limit so that it
  can properly stack with device mappers.

  Second, dm-crypt provides its minimum required limit to match the
  logical block size.

Keith Busch (3):
  block: make dma_alignment a stacking queue_limit
  dm-crypt: provide dma_alignment limit in io_hints
  block: make blk_set_default_limits() private

 block/blk-core.c       |  1 -
 block/blk-settings.c   |  9 +++++----
 block/blk.h            |  1 +
 drivers/md/dm-crypt.c  |  1 +
 include/linux/blkdev.h | 16 ++++++++--------
 5 files changed, 15 insertions(+), 13 deletions(-)

-- 
2.30.2


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

end of thread, other threads:[~2022-11-11  7:39 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-03 15:25 [PATCH 0/3] fix direct io errors on dm-crypt Keith Busch
2022-11-03 15:25 ` [dm-devel] " Keith Busch
2022-11-03 15:25 ` [PATCH 1/3] block: make dma_alignment a stacking queue_limit Keith Busch
2022-11-03 15:25   ` [dm-devel] " Keith Busch
2022-11-04  5:14   ` Christoph Hellwig
2022-11-04  5:14     ` [dm-devel] " Christoph Hellwig
2022-11-03 15:25 ` [PATCH 2/3] dm-crypt: provide dma_alignment limit in io_hints Keith Busch
2022-11-03 15:25   ` [dm-devel] " Keith Busch
2022-11-03 15:25 ` [PATCH 3/3] block: make blk_set_default_limits() private Keith Busch
2022-11-03 15:25   ` [dm-devel] " Keith Busch
2022-11-04  5:15   ` Christoph Hellwig
2022-11-04  5:15     ` [dm-devel] " Christoph Hellwig
2022-11-03 16:33 ` [dm-devel] [PATCH 0/3] fix direct io errors on dm-crypt Mikulas Patocka
2022-11-03 16:33   ` Mikulas Patocka
2022-11-03 20:39   ` Keith Busch
2022-11-03 20:39     ` [dm-devel] " Keith Busch
2022-11-04 13:09     ` Mikulas Patocka
2022-11-04 13:09       ` Mikulas Patocka
2022-11-03 16:41 ` Dmitrii Tcvetkov
2022-11-03 16:41   ` [dm-devel] " Dmitrii Tcvetkov
2022-11-10 18:24 ` Eric Biggers
2022-11-10 18:24   ` [dm-devel] " Eric Biggers
2022-11-10 18:45   ` Keith Busch
2022-11-10 18:45     ` [dm-devel] " Keith Busch

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.