mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-08-30 11:03:07 -04:00
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: eca383fcd6 ("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>
This commit is contained in:
committed by
Carlos Maiolino
parent
ec6978e6bf
commit
eb6b2cc1fc
@@ -1118,10 +1118,10 @@ xfs_sb_read_verify(
|
||||
* because _verify_common checks the on-disk values.
|
||||
*/
|
||||
__xfs_sb_from_disk(&sb, dsb, false);
|
||||
error = xfs_validate_sb_common(mp, bp, &sb);
|
||||
error = xfs_validate_sb_read(mp, &sb);
|
||||
if (error)
|
||||
goto out_error;
|
||||
error = xfs_validate_sb_read(mp, &sb);
|
||||
error = xfs_validate_sb_common(mp, bp, &sb);
|
||||
|
||||
out_error:
|
||||
if (error == -EFSCORRUPTED || error == -EFSBADCRC)
|
||||
|
||||
Reference in New Issue
Block a user