[XFS] Block mount attempts for filesystems with version 1 directories.
authorNathan Scott <nathans@sgi.com>
Thu, 5 May 2005 20:24:13 +0000 (13:24 -0700)
committerChristoph Hellwig <hch@melbourne.sgi.com>
Thu, 5 May 2005 20:24:13 +0000 (13:24 -0700)
SGI Modid: xfs-linux:xfs-kern:21937a

Signed-off-by: Nathan Scott <nathans@sgi.com>
Signed-off-by: Christoph Hellwig <hch@sgi.com>
fs/xfs/xfs_mount.c

index b57423caef9b86fa0f3fb381d0610f8c3afa8f45..2ec967d93e5ae5eb2aaf1ac06441294ee357382a 100644 (file)
@@ -300,6 +300,15 @@ xfs_mount_validate_sb(
                return XFS_ERROR(EFSCORRUPTED);
        }
 
+       /*
+        * Version 1 directory format has never worked on Linux.
+        */
+       if (unlikely(!XFS_SB_VERSION_HASDIRV2(sbp))) {
+               cmn_err(CE_WARN,
+       "XFS: Attempted to mount file system using version 1 directory format");
+               return XFS_ERROR(ENOSYS);
+       }
+
        /*
         * Until this is fixed only page-sized or smaller data blocks work.
         */