Re: [PATCH v2 00/13] forcealign for xfs

From: John Garry
Date: Mon Jul 08 2024 - 03:49:21 EST


On 06/07/2024 08:53, Christoph Hellwig wrote:
On Fri, Jul 05, 2024 at 04:24:37PM +0000, John Garry wrote:
The actual forcealign patches are the same in this series, modulo an
attempt for a fix in xfs_bunmapi_align().

Why forcealign?
In some scenarios to may be required to guarantee extent alignment and
granularity.

For example, for atomic writes, the maximum atomic write unit size would
be limited at the extent alignment and granularity, guaranteeing that an
atomic write would not span data present in multiple extents.

forcealign may be useful as a performance tuning optimization in other
scenarios.

From previous side discussion I know Dave disagrees, but given how
much pain the larger than FSB rtextents have caused I'm very skeptical
if taking this on is the right tradeoff.


I am not sure what that pain is, but I guess it's the maintainability and scalability of the scattered "if RT" checks for rounding up and down to larger extent size, right?

For forcealign, at least we can factor that stuff mostly into common forcealign+RT helpers, to keep the checks common. That is apart from the block allocator code.