aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2018-02-05 16:35:56 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2018-02-05 16:35:56 -0500
commite237f98a9c134c3d600353f21e07db915516875b (patch)
tree6fdbb2f53ae3a5f09bb03c013f103850583467c0
parent139351f1f98546c312a1942215977ea703b383b8 (diff)
parent76883f7988e6d06a97232e979bc7aaa7846a134b (diff)
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
-rw-r--r--fs/xfs/libxfs/xfs_sb.c4
-rw-r--r--fs/xfs/xfs_super.c24
-rw-r--r--fs/xfs/xfs_super.h7
3 files changed, 24 insertions, 11 deletions
diff --git a/fs/xfs/libxfs/xfs_sb.c b/fs/xfs/libxfs/xfs_sb.c
index 46af6aa60a8e..a55f7a45fa78 100644
--- a/fs/xfs/libxfs/xfs_sb.c
+++ b/fs/xfs/libxfs/xfs_sb.c
@@ -118,8 +118,8 @@ xfs_mount_validate_sb(
118 bool check_inprogress, 118 bool check_inprogress,
119 bool check_version) 119 bool check_version)
120{ 120{
121 u32 agcount = 0; 121 uint32_t agcount = 0;
122 u32 rem; 122 uint32_t rem;
123 123
124 if (sbp->sb_magicnum != XFS_SB_MAGIC) { 124 if (sbp->sb_magicnum != XFS_SB_MAGIC) {
125 xfs_warn(mp, "bad magic number"); 125 xfs_warn(mp, "bad magic number");
diff --git a/fs/xfs/xfs_super.c b/fs/xfs/xfs_super.c
index f3e0001f9992..7aba628dc527 100644
--- a/fs/xfs/xfs_super.c
+++ b/fs/xfs/xfs_super.c
@@ -1666,9 +1666,12 @@ xfs_fs_fill_super(
1666 "DAX unsupported by block device. Turning off DAX."); 1666 "DAX unsupported by block device. Turning off DAX.");
1667 mp->m_flags &= ~XFS_MOUNT_DAX; 1667 mp->m_flags &= ~XFS_MOUNT_DAX;
1668 } 1668 }
1669 if (xfs_sb_version_hasreflink(&mp->m_sb)) 1669 if (xfs_sb_version_hasreflink(&mp->m_sb)) {
1670 xfs_alert(mp, 1670 xfs_alert(mp,
1671 "DAX and reflink cannot be used together!"); 1671 "DAX and reflink cannot be used together!");
1672 error = -EINVAL;
1673 goto out_filestream_unmount;
1674 }
1672 } 1675 }
1673 1676
1674 if (mp->m_flags & XFS_MOUNT_DISCARD) { 1677 if (mp->m_flags & XFS_MOUNT_DISCARD) {
@@ -1681,15 +1684,18 @@ xfs_fs_fill_super(
1681 } 1684 }
1682 } 1685 }
1683 1686
1684 if (xfs_sb_version_hasrmapbt(&mp->m_sb)) { 1687 if (xfs_sb_version_hasreflink(&mp->m_sb) && mp->m_sb.sb_rblocks) {
1685 if (mp->m_sb.sb_rblocks) { 1688 xfs_alert(mp,
1686 xfs_alert(mp, 1689 "reflink not compatible with realtime device!");
1687 "EXPERIMENTAL reverse mapping btree not compatible with realtime device!"); 1690 error = -EINVAL;
1688 error = -EINVAL; 1691 goto out_filestream_unmount;
1689 goto out_filestream_unmount; 1692 }
1690 } 1693
1694 if (xfs_sb_version_hasrmapbt(&mp->m_sb) && mp->m_sb.sb_rblocks) {
1691 xfs_alert(mp, 1695 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;
1693 } 1699 }
1694 1700
1695 error = xfs_mountfs(mp); 1701 error = xfs_mountfs(mp);
diff --git a/fs/xfs/xfs_super.h b/fs/xfs/xfs_super.h
index fcc5dfc70aa0..8cee8e8050e3 100644
--- a/fs/xfs/xfs_super.h
+++ b/fs/xfs/xfs_super.h
@@ -44,6 +44,12 @@ extern void xfs_qm_exit(void);
44# define XFS_REALTIME_STRING 44# define XFS_REALTIME_STRING
45#endif 45#endif
46 46
47#ifdef CONFIG_XFS_ONLINE_SCRUB
48# define XFS_SCRUB_STRING "scrub, "
49#else
50# define XFS_SCRUB_STRING
51#endif
52
47#ifdef DEBUG 53#ifdef DEBUG
48# define XFS_DBG_STRING "debug" 54# define XFS_DBG_STRING "debug"
49#else 55#else
@@ -54,6 +60,7 @@ extern void xfs_qm_exit(void);
54#define XFS_BUILD_OPTIONS XFS_ACL_STRING \ 60#define XFS_BUILD_OPTIONS XFS_ACL_STRING \
55 XFS_SECURITY_STRING \ 61 XFS_SECURITY_STRING \
56 XFS_REALTIME_STRING \ 62 XFS_REALTIME_STRING \
63 XFS_SCRUB_STRING \
57 XFS_DBG_STRING /* DBG must be last */ 64 XFS_DBG_STRING /* DBG must be last */
58 65
59struct xfs_inode; 66struct xfs_inode;