linux-block.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCHv2 0/5] fix direct io device mapper errors
@ 2022-11-10 18:44 Keith Busch
  2022-11-10 18:44 ` [PATCHv2 1/5] block: make dma_alignment a stacking queue_limit Keith Busch
                   ` (6 more replies)
  0 siblings, 7 replies; 14+ messages in thread
From: Keith Busch @ 2022-11-10 18:44 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, -log-writes and -integrity require 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.

Changes since v1: Added the same fix for -integrity and -log-writes

The first three were reported successfully tested by Dmitrii Tcvetkov,
but I don't have an official Tested-by: tag.

  https://lore.kernel.org/linux-block/20221103194140.06ce3d36@xps.demsh.org/T/#mba1d0b13374541cdad3b669ec4257a11301d1860

Keitio errors on Busch (5):
  block: make dma_alignment a stacking queue_limit
  dm-crypt: provide dma_alignment limit in io_hints
  block: make blk_set_default_limits() private
  dm-integrity: set dma_alignment limit in io_hints
  dm-log-writes: set dma_alignment limit in io_hints

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

-- 
2.30.2


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

end of thread, other threads:[~2022-11-16 22:58 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-11-10 18:44 [PATCHv2 0/5] fix direct io device mapper errors Keith Busch
2022-11-10 18:44 ` [PATCHv2 1/5] block: make dma_alignment a stacking queue_limit Keith Busch
2022-11-10 18:44 ` [PATCHv2 2/5] dm-crypt: provide dma_alignment limit in io_hints Keith Busch
2022-11-16 20:05   ` Mike Snitzer
2022-11-10 18:44 ` [PATCHv2 3/5] block: make blk_set_default_limits() private Keith Busch
2022-11-10 18:45 ` [PATCHv2 4/5] dm-integrity: set dma_alignment limit in io_hints Keith Busch
2022-11-16 20:06   ` Mike Snitzer
2022-11-10 18:45 ` [PATCHv2 5/5] dm-log-writes: " Keith Busch
2022-11-16 20:07   ` Mike Snitzer
2022-11-11 18:07 ` [PATCHv2 0/5] fix direct io device mapper errors Mike Snitzer
2022-11-11 18:31   ` Keith Busch
2022-11-14 11:31     ` Mikulas Patocka
2022-11-14 18:12       ` Keith Busch
2022-11-16 22:58 ` Jens Axboe

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).