Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1b867d3a authored by Brian Foster's avatar Brian Foster Committed by Dave Chinner
Browse files

xfs: relocate sparse inode mount warning



The sparse inodes feature is currently considered experimental. We warn
at mount time from xfs_mount_validate_sb(). This function is part of the
superblock verifier codepath, however, which means it could be invoked
repeatedly on superblock reads or writes. This is currently only
noticeable from userspace, where mkfs produces multiple warnings at
format time.

As mkfs warnings were not the intent of this change, relocate the mount
time warning to xfs_fs_fill_super(), which is only invoked once and only
in kernel space.

Signed-off-by: default avatarBrian Foster <bfoster@redhat.com>
Reviewed-by: default avatarDave Chinner <dchinner@redhat.com>
Signed-off-by: default avatarDave Chinner <david@fromorbit.com>
parent 92863451
Loading
Loading
Loading
Loading
+0 −3
Original line number Original line Diff line number Diff line
@@ -182,9 +182,6 @@ xfs_mount_validate_sb(
	if (xfs_sb_version_hassparseinodes(sbp)) {
	if (xfs_sb_version_hassparseinodes(sbp)) {
		uint32_t	align;
		uint32_t	align;


		xfs_alert(mp,
	"EXPERIMENTAL sparse inode feature enabled. Use at your own risk!");

		align = XFS_INODES_PER_CHUNK * sbp->sb_inodesize
		align = XFS_INODES_PER_CHUNK * sbp->sb_inodesize
				>> sbp->sb_blocklog;
				>> sbp->sb_blocklog;
		if (sbp->sb_inoalignmt != align) {
		if (sbp->sb_inoalignmt != align) {
+4 −0
Original line number Original line Diff line number Diff line
@@ -1528,6 +1528,10 @@ xfs_fs_fill_super(
		}
		}
	}
	}


	if (xfs_sb_version_hassparseinodes(&mp->m_sb))
		xfs_alert(mp,
	"EXPERIMENTAL sparse inode feature enabled. Use at your own risk!");

	error = xfs_mountfs(mp);
	error = xfs_mountfs(mp);
	if (error)
	if (error)
		goto out_filestream_unmount;
		goto out_filestream_unmount;