On Tue, Aug 05, 2025 at 07:11:17AM -0700, Keith Busch wrote: > bio_for_each_bvec(bv, bio, iter) { > + if (bv.bv_offset & lim->dma_alignment) > + return -EINVAL; I have a question about this part here because testing with various scsi is showing odd results. NVMe wants this check to actually be this: if ((bv.bv_offset | bv.bv_len) & lim->dma_alignment) because the dma alignment defines not only the starting address offset, but also the length. NVMe's default alignment is 4 bytes. But I can't make that change because many scsi devices don't set the dma alignment and get the default 511 value. This is fine for the memory address offset, but the lengths sent for various inquriy commands are much smaller, like 4 and 32 byte lengths. That length wouldn't pass the dma alignment granularity, so I think the default value is far too conservative. Does the address start size need to be a different limit than minimum length? I feel like they should be the same, but maybe that's just an nvme thing.