Skip to content
Commit 556b8883 authored by Dave Chinner's avatar Dave Chinner Committed by Dave Chinner
Browse files

xfs: xfs_readsb needs to check for magic numbers



Commit daba5427 ("xfs: skip verification on initial "guess"
superblock read") dropped the use of a verifier for the initial
superblock read so we can probe the sector size of the filesystem
stored in the superblock. It, however, now fails to validate that
what was read initially is actually an XFS superblock and hence will
fail the sector size check and return ENOSYS.

This causes probe-based mounts to fail because it expects XFS to
return EINVAL when it doesn't recognise the superblock format.

cc: <stable@vger.kernel.org>
Reported-by: default avatarPlamen Petrov <plamen.sisi@gmail.com>
Tested-by: default avatarPlamen Petrov <plamen.sisi@gmail.com>
Signed-off-by: default avatarDave Chinner <dchinner@redhat.com>
Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
Signed-off-by: default avatarDave Chinner <david@fromorbit.com>
parent 1f6d6482
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment