]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
xfs: move kernel-specific superblock validation out of libxfs
authorDarrick J. Wong <darrick.wong@oracle.com>
Thu, 7 Jan 2021 20:59:17 +0000 (15:59 -0500)
committerEric Sandeen <sandeen@sandeen.net>
Thu, 7 Jan 2021 20:59:17 +0000 (15:59 -0500)
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 <darrick.wong@oracle.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Brian Foster <bfoster@redhat.com>
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
libxfs/xfs_sb.c

index fb2212b899121f3f49c9d871781fc5f1043d117a..67004368ccd5f04c3b4208bf7494d1b0d781642a 100644 (file)
@@ -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;
 }