Re: [PATCH 1/4] iomap: Lift blocksize restriction on atomic writes

John Garry
2025-01-20T08:30:09Z

On 17/01/2025 18:29, Darrick J. Wong wrote:
>>> Ok, let's do that then. Just to be clear -- for any RWF_ATOMIC direct
>>> write that's correctly aligned and targets a single mapping in the
>>> correct state, we can build the untorn bio and submit it. For
>>> everything else, prealloc some post EOF blocks, write them there, and
>>> exchange-range them.
>> I have some doubt about this, but I may be misunderstanding the concept:
>>
>> So is there any guarantee that what we write into is aligned (after the
>> exchange-range routine)? If not, surely every subsequent write with
>> RWF_ATOMIC to that logical range will require this exchange-range routine
>> until we get something aligned (and correct granularity) - correct?
> Correct, you'd still need forcealign to make sure that the new
> allocations for exchange-range are aligned to awumin.

Sure, but I think that if we align sb_agblocks to the bdev atomic write
limits at mkfs time and also set extszhint appropriately, then
probability of desired alignment and granularity is appreciably higher.

Thanks,
John