Re: [RFC PATCH 0/3] xfs: forced extent alignment

John Garry
2024-03-06T17:56:38Z

On 06/03/2024 11:46, John Garry wrote:
>> The following 3 patches:
>>
>> - rework the setup and extent allocation logic a bit to make force
>>    aligned allocation much easier to implement and understand
>> - move all the alignment adjustments into the setup logic
>> - rework the alignment slop calculations and greatly simplify the
>>    the exact EOF block allocation case
>> - add a XFS_ALLOC_FORCEALIGN flag so that the inode config only
>>    needs to be checked once at setup. This also allows other
>>    allocation types (e.g. inode clusters) use forced alignment
>>    allocation semantics in future.
>> - clearly document when we are turning off allocation alignment and
>>    abort FORCEALIGN allocation at that point rather than doing
>>    unaligned allocation.
>>
>> I've run this through fstests once so it doesn't let the smoke out,
>> but I haven't actually tested it against a stripe aligned filesystem
>> config yet, nor tested the forcealign functionality so it may not be
>> exactly right yet.
>>
>> Is this sufficiently complete for you to take from here into the
>> forcealign series?
>>
>
> I'll try it out.

Update:
I replaced your patches with the relevant forcealign patches which I
send out in "[PATCH v2 00/14] block atomic writes for XFS".

So far they seem to work fine. An updated branch is here, if you want to
check what else I am using:
https://github.com/johnpgarry/linux/commits/atomic-writes-v6.8-v5-fs-v2-dchinner/

I haven't tried any stripe unit testing yet - I'll look at that now.

Thanks,
John