]> git.ipfire.org Git - thirdparty/linux.git/commit
xfs: check v5 superblock features early
authorChristoph Hellwig <hch@lst.de>
Wed, 29 Jul 2026 13:00:58 +0000 (15:00 +0200)
committerCarlos Maiolino <cem@kernel.org>
Mon, 3 Aug 2026 08:30:28 +0000 (10:30 +0200)
commiteb6b2cc1fc8ad566d746d128a559989ff0bba5cc
tree34a3492bfc199643a22cc4ae7602f4150a594425
parentec6978e6bf68fb6f51edd4f700f9a554dc0da894
xfs: check v5 superblock features early

When working on a new features that reuses the existing pad in the
superblock, I noticed that mounting such a file system on an old kernel
logs a rather confusing warning:

    XFS (vdc): Metadir superblock padding fields must be zero.

This is because we only validate the various feature fields in v5
superblocks after the common superblock validation helper is called.

Fix this by calling the feature validation first.

Fixes: eca383fcd63b ("xfs: refactor superblock verifiers")
Cc: <stable@vger.kernel.org> # v4.19
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Carlos Maiolino <cem@kernel.org>
fs/xfs/libxfs/xfs_sb.c