[PATCH] fs: remove power of 2 and length boundary atomic write restrictions

John Garry john.g.garry at oracle.com
Tue Jan 6 03:26:51 PST 2026


On 06/01/2026 10:50, Vitaliy Filippov wrote:
>> If a user follows the current rules, they will not get a write which
>> spans multiple extents and hence no -EINVAL. That is how it works for
>> ext4, anyway.
> 
> What if he makes a sparse file by writing at random 64 kb aligned
> offsets and then trying to overwrite 128 KB atomically? He'll still
> get EINVAL as I understand.

For ext4, the maximum atomic write size is limited to the bigalloc 
cluster size. Disk blocks are allocated to this cluster size granularity 
and alignment. As such, a properly aligned atomic write <= cluster size 
can never span discontiguous disk blocks.



More information about the Linux-nvme mailing list