]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
xfs: disallow mounting of realtime + rmap filesystems
authorDarrick J. Wong <darrick.wong@oracle.com>
Fri, 26 Aug 2016 05:59:19 +0000 (15:59 +1000)
committerDave Chinner <david@fromorbit.com>
Fri, 26 Aug 2016 05:59:19 +0000 (15:59 +1000)
Since the kernel doesn't currently support the realtime rmapbt,
don't allow such filesystems to be mounted.  Support will appear
in a future release.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Carlos Maiolino <cmaiolino@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Dave Chinner <david@fromorbit.com>
fs/xfs/xfs_super.c

index 24ef83ef04de2be5c8fd1e77ab62fa3b59106376..fd6be45b3a1e01c81bfe179d67818bafc9f6ec92 100644 (file)
@@ -1574,9 +1574,16 @@ xfs_fs_fill_super(
                }
        }
 
-       if (xfs_sb_version_hasrmapbt(&mp->m_sb))
+       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;
+               }
                xfs_alert(mp,
        "EXPERIMENTAL reverse mapping btree feature enabled. Use at your own risk!");
+       }
 
        error = xfs_mountfs(mp);
        if (error)