From: Darrick J. Wong Date: Thu, 7 Jan 2021 20:59:17 +0000 (-0500) Subject: xfs: move kernel-specific superblock validation out of libxfs X-Git-Tag: v5.11.0-rc0~30 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=40d3972320116066d9a33a4f89117f75f2476072;p=thirdparty%2Fxfsprogs-dev.git xfs: move kernel-specific superblock validation out of libxfs Source kernel commit: 3945ae03d822aa47584dd502ac024ae1e1eb9e2d A couple of the superblock validation checks apply only to the kernel, so move them to xfs_fc_fill_super before we add the needsrepair "feature", which will prevent the kernel (but not xfsprogs) from mounting the filesystem. This also reduces the diff between kernel and userspace libxfs. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner Reviewed-by: Brian Foster Reviewed-by: Eric Sandeen Signed-off-by: Eric Sandeen --- diff --git a/libxfs/xfs_sb.c b/libxfs/xfs_sb.c index fb2212b89..67004368c 100644 --- a/libxfs/xfs_sb.c +++ b/libxfs/xfs_sb.c @@ -394,13 +394,6 @@ xfs_validate_sb_common( return -ENOSYS; } - if (xfs_sb_validate_fsb_count(sbp, sbp->sb_dblocks) || - xfs_sb_validate_fsb_count(sbp, sbp->sb_rblocks)) { - xfs_warn(mp, - "file system too large to be mounted on this system."); - return -EFBIG; - } - return 0; }