Skip to content

Commit e237f98

Browse files
committed
Merge tag 'xfs-4.16-merge-5' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux
Pull more xfs updates from Darrick Wong: "As promised, here's a (much smaller) second pull request for the second week of the merge cycle. This time around we have a couple patches shutting off unsupported fs configurations, and a couple of cleanups. Last, we turn off EXPERIMENTAL for the reverse mapping btree, since the primary downstream user of that information (online fsck) is now upstream and I haven't seen any major failures in a few kernel releases. Summary: - Print scrub build status in the xfs build info. - Explicitly call out the remaining two scenarios where we don't support reflink and never have. - Remove EXPERIMENTAL tag from reverse mapping btree!" * tag 'xfs-4.16-merge-5' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux: xfs: remove experimental tag for reverse mapping xfs: don't allow reflink + realtime filesystems xfs: don't allow DAX on reflink filesystems xfs: add scrub to XFS_BUILD_OPTIONS xfs: fix u32 type usage in sb validation function
2 parents 139351f + 76883f7 commit e237f98

File tree

3 files changed

+24
-11
lines changed

3 files changed

+24
-11
lines changed

fs/xfs/libxfs/xfs_sb.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,8 @@ xfs_mount_validate_sb(
118118
bool check_inprogress,
119119
bool check_version)
120120
{
121-
u32 agcount = 0;
122-
u32 rem;
121+
uint32_t agcount = 0;
122+
uint32_t rem;
123123

124124
if (sbp->sb_magicnum != XFS_SB_MAGIC) {
125125
xfs_warn(mp, "bad magic number");

fs/xfs/xfs_super.c

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1666,9 +1666,12 @@ xfs_fs_fill_super(
16661666
"DAX unsupported by block device. Turning off DAX.");
16671667
mp->m_flags &= ~XFS_MOUNT_DAX;
16681668
}
1669-
if (xfs_sb_version_hasreflink(&mp->m_sb))
1669+
if (xfs_sb_version_hasreflink(&mp->m_sb)) {
16701670
xfs_alert(mp,
16711671
"DAX and reflink cannot be used together!");
1672+
error = -EINVAL;
1673+
goto out_filestream_unmount;
1674+
}
16721675
}
16731676

16741677
if (mp->m_flags & XFS_MOUNT_DISCARD) {
@@ -1681,15 +1684,18 @@ xfs_fs_fill_super(
16811684
}
16821685
}
16831686

1684-
if (xfs_sb_version_hasrmapbt(&mp->m_sb)) {
1685-
if (mp->m_sb.sb_rblocks) {
1686-
xfs_alert(mp,
1687-
"EXPERIMENTAL reverse mapping btree not compatible with realtime device!");
1688-
error = -EINVAL;
1689-
goto out_filestream_unmount;
1690-
}
1687+
if (xfs_sb_version_hasreflink(&mp->m_sb) && mp->m_sb.sb_rblocks) {
1688+
xfs_alert(mp,
1689+
"reflink not compatible with realtime device!");
1690+
error = -EINVAL;
1691+
goto out_filestream_unmount;
1692+
}
1693+
1694+
if (xfs_sb_version_hasrmapbt(&mp->m_sb) && mp->m_sb.sb_rblocks) {
16911695
xfs_alert(mp,
1692-
"EXPERIMENTAL reverse mapping btree feature enabled. Use at your own risk!");
1696+
"reverse mapping btree not compatible with realtime device!");
1697+
error = -EINVAL;
1698+
goto out_filestream_unmount;
16931699
}
16941700

16951701
error = xfs_mountfs(mp);

fs/xfs/xfs_super.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,12 @@ extern void xfs_qm_exit(void);
4444
# define XFS_REALTIME_STRING
4545
#endif
4646

47+
#ifdef CONFIG_XFS_ONLINE_SCRUB
48+
# define XFS_SCRUB_STRING "scrub, "
49+
#else
50+
# define XFS_SCRUB_STRING
51+
#endif
52+
4753
#ifdef DEBUG
4854
# define XFS_DBG_STRING "debug"
4955
#else
@@ -54,6 +60,7 @@ extern void xfs_qm_exit(void);
5460
#define XFS_BUILD_OPTIONS XFS_ACL_STRING \
5561
XFS_SECURITY_STRING \
5662
XFS_REALTIME_STRING \
63+
XFS_SCRUB_STRING \
5764
XFS_DBG_STRING /* DBG must be last */
5865

5966
struct xfs_inode;

0 commit comments

Comments
 (0)