From: Nathan Scott Date: Thu, 5 May 2005 20:24:13 +0000 (-0700) Subject: [XFS] Block mount attempts for filesystems with version 1 directories. X-Git-Tag: v2.6.12-rc4~131 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=de20614b351e4d4d23af0a105baa8fd2d7cd4f26;p=linux-2.6 [XFS] Block mount attempts for filesystems with version 1 directories. SGI Modid: xfs-linux:xfs-kern:21937a Signed-off-by: Nathan Scott Signed-off-by: Christoph Hellwig --- diff --git a/fs/xfs/xfs_mount.c b/fs/xfs/xfs_mount.c index b57423caef..2ec967d93e 100644 --- a/fs/xfs/xfs_mount.c +++ b/fs/xfs/xfs_mount.c @@ -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. */