]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
xfs: don't allow reflink + realtime filesystems
authorDarrick J. Wong <darrick.wong@oracle.com>
Thu, 1 Feb 2018 00:38:18 +0000 (16:38 -0800)
committerDarrick J. Wong <darrick.wong@oracle.com>
Fri, 2 Feb 2018 05:06:16 +0000 (21:06 -0800)
We don't support realtime filesystems with reflink either, so fail
those mounts.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Bill O'Donnell <billodo@redhat.com>
fs/xfs/xfs_super.c

index 0505605e25c1b7e44b0a047f2efaf3ef10c3aea5..96388fb9adffd7c590fe02753e6fb61b92a08320 100644 (file)
@@ -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,