Re: [PATCH 11/21] fs: xfs: Don't use low-space allocator for alignment > 1

From: John Garry
Date: Tue Oct 03 2023 - 06:24:08 EST


On 03/10/2023 04:00, Darrick J. Wong wrote:
How does this happen?

The earlier failing aligned allocations will clear alignment before
we get here....
I was thinking the predicate should be xfs_inode_force_align(ip) to save
me/us from thinking about all the other weird ways args->alignment could
end up 1.

/* forced-alignment means we don't use low mode */
if (xfs_inode_force_align(ip))

My idea was that if we add another feature which requires args->alignment > 1 be honoured, then we would need to change this code to cover both features, so better just check args->alignment > 1.

return -ENOSPC;
Thanks,
John