From: Keith Busch <kbusch@kernel.org>
To: Mikulas Patocka <mpatocka@redhat.com>
Cc: Keith Busch <kbusch@meta.com>,
dm-devel@lists.linux.dev, linux-block@vger.kernel.org,
snitzer@kernel.org
Subject: Re: [RESEND PATCHv3 1/2] dm-crypt: allow unaligned bio_vecs for direct io
Date: Wed, 25 Mar 2026 12:34:47 -0600 [thread overview]
Message-ID: <acQqx_gCjHmP8BGR@kbusch-mbp> (raw)
In-Reply-To: <fa0978af-398b-a212-73bc-80f0f2c375a4@redhat.com>
On Wed, Mar 18, 2026 at 07:06:40PM +0100, Mikulas Patocka wrote:
>
> If we have dm-integrity with 512-byte sector size on the top of a device
> that has dma_alignment less than 512, the code would set
> limits->dma_alignment to the value of the underlying block device and
> break dm-integrity (which assumes sector-aligned bios).
>
> But that's a problem of dm-integrity - this "if (ic->sectors_per_block >
> 1)" condition in dm_integrity_io_hints is weird, it should be dropped and
> the limits should be properly merged.
Looks like dm-integrity is a bit weird for other reasons, too. If a user
creates a dm-integrity device with block size of 1k or 2k, but the
backing device is 4k logical size, we'll have a mismatch from what the
dm-integrity block device reports compared to what it can actually do.
The pattern needed to get it right is repeated several times, so a
helper is probably warranted. I'll put a series together as a prep and
fix up.
next prev parent reply other threads:[~2026-03-25 18:34 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-16 15:02 [RESEND PATCHv3 1/2] dm-crypt: allow unaligned bio_vecs for direct io Keith Busch
2026-03-16 15:09 ` [RESEND PATCHv3 2/2] dm-crypt: dynamic scatterlist for many segments Keith Busch
2026-03-18 16:34 ` Mikulas Patocka
2026-03-18 17:01 ` Keith Busch
2026-03-18 17:40 ` Mikulas Patocka
2026-03-18 17:53 ` Keith Busch
2026-03-18 18:16 ` Mikulas Patocka
2026-03-18 18:32 ` Keith Busch
2026-03-18 18:41 ` Mikulas Patocka
2026-03-16 15:09 ` [RESEND PATCHv3 0/2] dm-crypt: support relaxed memory alignment Keith Busch
2026-03-18 16:19 ` [RESEND PATCHv3 1/2] dm-crypt: allow unaligned bio_vecs for direct io Mikulas Patocka
2026-03-18 17:40 ` Keith Busch
2026-03-18 18:06 ` Mikulas Patocka
2026-03-18 18:35 ` Keith Busch
2026-03-25 18:34 ` Keith Busch [this message]
-- strict thread matches above, loose matches on Subject: below --
2026-01-14 15:49 [RESEND PATCHv3 0/2] dm-crypt: support relaxed memory alignment Keith Busch
2026-01-14 15:49 ` [RESEND PATCHv3 1/2] dm-crypt: allow unaligned bio_vecs for direct io 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=acQqx_gCjHmP8BGR@kbusch-mbp \
--to=kbusch@kernel.org \
--cc=dm-devel@lists.linux.dev \
--cc=kbusch@meta.com \
--cc=linux-block@vger.kernel.org \
--cc=mpatocka@redhat.com \
--cc=snitzer@kernel.org \
/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 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.