On 12/09/2024 16:07, Christoph Hellwig wrote:Hmm. Why don't we reject such an I/O? We cannot guarantee an atomic write, so I think we should be perfectly fine to return an error to
We should do be able to, but with this patch we cannot. However, aYes, misaligned partitions is very unexpected, but with large and
misaligned partition would be very much unexpected.
potentially unlimited atomic boundaries I would not expect the size
to always be aligned. But then again at least in NVMe atomic writes
don't need to match the max size anyway, so I'm not entirely sure
what the problem actually is.
Actually it's not an alignment issue, but a size issue.
Consider a 3.5MB partition and atomic write max is 1MB. If we tried to atomic write 1MB at offset 3MB, then it would be truncated to a 0.5MB write.
So maybe it is an application bug.