From: Dmitrii Tcvetkov <me@demsh.org>
To: Keith Busch <kbusch@meta.com>
Cc: <linux-block@vger.kernel.org>, <dm-devel@redhat.com>,
<axboe@kernel.dk>, <stefanha@redhat.com>, <ebiggers@kernel.org>,
<mpatocka@redhat.com>, Keith Busch <kbusch@kernel.org>
Subject: Re: [PATCH 0/3] fix direct io errors on dm-crypt
Date: Thu, 3 Nov 2022 19:41:40 +0300 [thread overview]
Message-ID: <20221103194140.06ce3d36@xps.demsh.org> (raw)
In-Reply-To: <20221103152559.1909328-1-kbusch@meta.com>
On Thu, 3 Nov 2022 08:25:56 -0700
Keith Busch <kbusch@meta.com> wrote:
> 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(-)
>
Applied on top 6.1-rc3, after that issue[1] doesn't reproduce.
[1] https://lore.kernel.org/linux-block/20221101001558.648ee024@xps.demsh.org/
next prev parent reply other threads:[~2022-11-03 16:45 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-03 15:25 [PATCH 0/3] fix direct io errors on dm-crypt Keith Busch
2022-11-03 15:25 ` [PATCH 1/3] block: make dma_alignment a stacking queue_limit Keith Busch
2022-11-04 5:14 ` 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 ` [PATCH 3/3] block: make blk_set_default_limits() private Keith Busch
2022-11-04 5:15 ` Christoph Hellwig
2022-11-03 16:33 ` [PATCH 0/3] fix direct io errors on dm-crypt Mikulas Patocka
2022-11-03 20:39 ` Keith Busch
2022-11-04 13:09 ` Mikulas Patocka
2022-11-03 16:41 ` Dmitrii Tcvetkov [this message]
2022-11-10 18:24 ` Eric Biggers
2022-11-10 18:45 ` Keith Busch
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20221103194140.06ce3d36@xps.demsh.org \
--to=me@demsh.org \
--cc=axboe@kernel.dk \
--cc=dm-devel@redhat.com \
--cc=ebiggers@kernel.org \
--cc=kbusch@kernel.org \
--cc=kbusch@meta.com \
--cc=linux-block@vger.kernel.org \
--cc=mpatocka@redhat.com \
--cc=stefanha@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).