Re: [PATCH 04/28] xfs: undefine the sb_bad_features2 when metadir is enabled

Christoph Hellwig
2024-10-14T07:53:22Z

On Thu, Oct 10, 2024 at 05:49:25PM -0700, Darrick J. Wong wrote:
> From: Darrick J. Wong <djwong@kernel.org>
>
> The metadir feature is a good opportunity to break from the past where
> we had to do this strange dance with sb_bad_features2 due to a past bug
> where the superblock was not kept aligned to a multiple of 8 bytes.
>
> Therefore, stop this pretense when metadir is enabled. We'll just set
> the incore and ondisk fields to zero, thereby freeing up 4 bytes of
> space in the superblock. We'll reuse those 4 bytes later.

FYI, still not a huge fan of the extra gymnastics for this vs just
appending the new fields at the end, but the code looks correct:

Reviewed-by: Christoph Hellwig <hch@lst.de>