On Tue, Jun 16, 2026 at 05:55:13PM +0200, Mikulas Patocka wrote: > I thought that reverting 5ff3f74e145a and re-introducing the alignment > check in block/fops.c:blkdev_dio_invalid would fix it - but it wouldn't. > > The same problem existed even before 5ff3f74e145a, with the pvmove > command.
Also before 5ff3f74e145a, you could still have devices that are perfectly fine with dword aligned dma, so sub-sector vectors would have passed the checks and gone through to dm-raid, which would have miscounted the remaining. > So, I think that the proper way to fix this is to teach dm-mirror/dm-io to > deal with unaligned bio vectors and handle them properly. The block layer already handles it, so I think just dispatch it and check the bi_status is all the stacking drivers need to do.
