From 131fa58d391fc0939f6c66b23776ad5df5db20f9 Mon Sep 17 00:00:00 2001 From: Darrick J. Wong Date: Mon, 29 Jan 2018 18:49:35 -0800 Subject: xfs: fix u32 type usage in sb validation function Don't use u32, use uint32_t, because this won't work in xfsprogs. Signed-off-by: Darrick J. Wong Reviewed-by: Eric Sandeen --- fs/xfs/libxfs/xfs_sb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'fs') 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( bool check_inprogress, bool check_version) { - u32 agcount = 0; - u32 rem; + uint32_t agcount = 0; + uint32_t rem; if (sbp->sb_magicnum != XFS_SB_MAGIC) { xfs_warn(mp, "bad magic number"); -- cgit v1.2.3 From 494370ccaae891de0a99b3c23b2df482c95cab8c Mon Sep 17 00:00:00 2001 From: Eric Sandeen Date: Wed, 31 Jan 2018 11:31:10 -0800 Subject: xfs: add scrub to XFS_BUILD_OPTIONS Advertise this config option along with the others. Signed-off-by: Eric Sandeen Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong --- fs/xfs/xfs_super.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'fs') 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); # define XFS_REALTIME_STRING #endif +#ifdef CONFIG_XFS_ONLINE_SCRUB +# define XFS_SCRUB_STRING "scrub, " +#else +# define XFS_SCRUB_STRING +#endif + #ifdef DEBUG # define XFS_DBG_STRING "debug" #else @@ -54,6 +60,7 @@ extern void xfs_qm_exit(void); #define XFS_BUILD_OPTIONS XFS_ACL_STRING \ XFS_SECURITY_STRING \ XFS_REALTIME_STRING \ + XFS_SCRUB_STRING \ XFS_DBG_STRING /* DBG must be last */ struct xfs_inode; -- cgit v1.2.3 From b6e03c10bf3ff08c7678a946a2208b60e66f4426 Mon Sep 17 00:00:00 2001 From: Darrick J. Wong Date: Wed, 31 Jan 2018 14:21:56 -0800 Subject: xfs: don't allow DAX on reflink filesystems Now that reflink is no longer experimental, reject attempts to mount with DAX until that whole mess gets sorted out. Signed-off-by: Darrick J. Wong Reviewed-by: Bill O'Donnell Reviewed-by: Dave Chinner --- fs/xfs/xfs_super.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'fs') diff --git a/fs/xfs/xfs_super.c b/fs/xfs/xfs_super.c index f3e0001f9992..0505605e25c1 100644 --- a/fs/xfs/xfs_super.c +++ b/fs/xfs/xfs_super.c @@ -1666,9 +1666,12 @@ xfs_fs_fill_super( "DAX unsupported by block device. Turning off DAX."); mp->m_flags &= ~XFS_MOUNT_DAX; } - if (xfs_sb_version_hasreflink(&mp->m_sb)) + if (xfs_sb_version_hasreflink(&mp->m_sb)) { xfs_alert(mp, "DAX and reflink cannot be used together!"); + error = -EINVAL; + goto out_filestream_unmount; + } } if (mp->m_flags & XFS_MOUNT_DISCARD) { -- cgit v1.2.3 From c14632ddac98dca7ab1740461fae330d09909560 Mon Sep 17 00:00:00 2001 From: Darrick J. Wong Date: Wed, 31 Jan 2018 16:38:18 -0800 Subject: xfs: don't allow reflink + realtime filesystems We don't support realtime filesystems with reflink either, so fail those mounts. Signed-off-by: Darrick J. Wong Reviewed-by: Bill O'Donnell --- fs/xfs/xfs_super.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'fs') diff --git a/fs/xfs/xfs_super.c b/fs/xfs/xfs_super.c index 0505605e25c1..96388fb9adff 100644 --- a/fs/xfs/xfs_super.c +++ b/fs/xfs/xfs_super.c @@ -1684,6 +1684,13 @@ xfs_fs_fill_super( } } + if (xfs_sb_version_hasreflink(&mp->m_sb) && mp->m_sb.sb_rblocks) { + xfs_alert(mp, + "reflink not compatible with realtime device!"); + error = -EINVAL; + goto out_filestream_unmount; + } + if (xfs_sb_version_hasrmapbt(&mp->m_sb)) { if (mp->m_sb.sb_rblocks) { xfs_alert(mp, -- cgit v1.2.3 From 76883f7988e6d06a97232e979bc7aaa7846a134b Mon Sep 17 00:00:00 2001 From: Darrick J. Wong Date: Wed, 31 Jan 2018 09:47:25 -0800 Subject: xfs: remove experimental tag for reverse mapping Reverse mapping has had a while to soak, so remove the experimental tag. Now that we've landed space metadata cross-referencing in scrub, the feature actually has a purpose. Reject rmap filesystems with an rt device until the code to support it is actually implemented. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner Reviewed-by: Bill O'Donnell --- fs/xfs/xfs_super.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'fs') diff --git a/fs/xfs/xfs_super.c b/fs/xfs/xfs_super.c index 96388fb9adff..7aba628dc527 100644 --- a/fs/xfs/xfs_super.c +++ b/fs/xfs/xfs_super.c @@ -1691,15 +1691,11 @@ xfs_fs_fill_super( goto out_filestream_unmount; } - if (xfs_sb_version_hasrmapbt(&mp->m_sb)) { - if (mp->m_sb.sb_rblocks) { - xfs_alert(mp, - "EXPERIMENTAL reverse mapping btree not compatible with realtime device!"); - error = -EINVAL; - goto out_filestream_unmount; - } + if (xfs_sb_version_hasrmapbt(&mp->m_sb) && mp->m_sb.sb_rblocks) { xfs_alert(mp, - "EXPERIMENTAL reverse mapping btree feature enabled. Use at your own risk!"); + "reverse mapping btree not compatible with realtime device!"); + error = -EINVAL; + goto out_filestream_unmount; } error = xfs_mountfs(mp); -- cgit v1.2.3