Repository navigation
Conversation
|
Upstream branch: 7be4bc5 |
435b194 to
fd67522
Compare
|
Upstream branch: 17bb0e2 |
5cedb41 to
569a027
Compare
fd67522 to
3b53a63
Compare
|
Upstream branch: 21a7f44 |
569a027 to
1f2b784
Compare
3b53a63 to
5d84576
Compare
|
Upstream branch: 6b4b543 |
1f2b784 to
1b945ac
Compare
5d84576 to
6582ed2
Compare
|
Upstream branch: fb2c3f4 |
1b945ac to
62acbb2
Compare
6582ed2 to
b3a1abc
Compare
|
Upstream branch: d135ab4 |
62acbb2 to
1c189ac
Compare
b3a1abc to
712496f
Compare
|
Upstream branch: c339f40 |
1c189ac to
b1e59c3
Compare
712496f to
a186880
Compare
|
Upstream branch: d89e1d1 |
b1e59c3 to
ea8909f
Compare
a186880 to
46206a3
Compare
|
Upstream branch: 6628e7d |
ea8909f to
5b91e57
Compare
46206a3 to
220bd96
Compare
|
Upstream branch: 05441d6 |
5b91e57 to
95b5164
Compare
220bd96 to
6c4625e
Compare
|
Upstream branch: f66469d |
95b5164 to
e1f51b4
Compare
6c4625e to
c7f678d
Compare
|
Upstream branch: d487237 |
e1f51b4 to
541143a
Compare
c7f678d to
6aa6cd1
Compare
On Thu, Jul 09, 2026 at 09:15:17AM -0700, Keith Busch wrote: > From: Keith Busch <kbusch@kernel.org> > > All device mappers that want to override the dma_alignment do so. > However, because the default stacking limit is set to 511, a device > mapper couldn't make it smaller even if it is capable of handling > finer grained alignment. > > Set the default dm stacking dma_alignment limit to 0 so that it can be > stacked with any value a device mapper wants. If a mapper doesn't > override the value, the initial 0 value will get changed to the original > default 511 value when the limits are validated after the device > stacking is complete. > > Signed-off-by: Keith Busch <kbusch@kernel.org> > --- > drivers/md/dm-table.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/md/dm-table.c b/drivers/md/dm-table.c > index dc2eff6..80326f8096cb7 100644 > --- a/drivers/md/dm-table.c > +++ b/drivers/md/dm-table.c > @@ -591,6 +591,7 @@ static void dm_set_stacking_limits(struct queue_limits *limits) > { > blk_set_stacking_limits(limits); > limits->features |= BLK_FEAT_IO_STAT | BLK_FEAT_NOWAIT | BLK_FEAT_POLL; > + limits->dma_alignment = 0; > } > > /* > -- > 2.52.0 > This isn't a DM-specific concern (just happens to be that you're focused on dm-crypt in this patchset). dm-crypt is still imposing a too strict dma_alignment, and so that'll need fixing too (along with other DM targets that aren't properly considering the underlying devices' queue_limits provided dma_alignment). But this is a proper fix that I needed to allow MD RAID0 to allow O_DIRECT to NVMe devices beneath the MD device: From: Mike Snitzer <snitzer@kernel.org> Date: Fri, 9 Oct 2026 06:26:29 -0600 Subject: [PATCH] block: let a stacking device inherit its members' DMA alignment blk_set_stacking_limits() initializes dma_alignment to SECTOR_SIZE - 1, and blk_stack_limits() then takes the maximum of that and each member's value. As a result every MD array and device-mapper table requires 512-byte aligned memory regardless of what its members need: a raid0 of NVMe namespaces reports a dma_alignment of 511 while each member reports 3. Direct I/O from memory every member accepts is therefore rejected at the stacking device, and callers that check the advertised alignment (for instance through STATX_DIOALIGN) fall back to buffered I/O. Leave dma_alignment at zero in blk_set_stacking_limits() so that the stacked value is the strictest of the members'. blk_validate_limits() still applies the SECTOR_SIZE - 1 default when nothing was stacked, such as for a table with no devices. Targets that process the data themselves and need logical-block-aligned memory already set dma_alignment in their io_hints (dm-crypt, dm-integrity, dm-verity, dm-log-writes), and NVMe multipath sets its own. Assisted-by: LLM Signed-off-by: Mike Snitzer <snitzer@kernel.org>
|
Upstream branch: b3dfbde |
541143a to
8481b31
Compare
Pull request for series with
subject: block: let a stacking device inherit its members' DMA alignment
version: 1
url: https://patchwork.kernel.org/series/1191479/