On Fri, 11 Nov 2022, Keith Busch wrote: > > There are other DM targets that override logical_block_size in their > > .io_hints hook (writecache, ebs, zoned). Have you reasoned through why > > those do _not_ need updating too? > > Yeah, that's a good question. The ones that have a problem all make > assumptions about a bio's bv_offset being logical block size aligned, > and each of those is accounted for here. Everything else looks fine with > respect to handling offsets. Unaligned bv_offset should work - because XFS is sending such bios. If you compile the kernel with memory debugging, kmalloc returns unaligned memory. XFS will allocate a buffer with kmalloc, test if it crosses a page boundary, if not, use the buffer, if yes, free the buffer and allocate a full page. There have been device mapper problems about unaligned bv_offset in the past and I have fixed them. Unaligned bv_length is a problem for the affected targets. Mikulas -- dm-devel mailing list dm-devel@xxxxxxxxxx https://listman.redhat.com/mailman/listinfo/dm-devel