Commit de20614b351e4d4d23af0a105baa8fd2d7cd4f26

Authored by Nathan Scott
Committed by Christoph Hellwig
1 parent 71bce256bf

[XFS] Block mount attempts for filesystems with version 1 directories.

SGI Modid: xfs-linux:xfs-kern:21937a

Signed-off-by: Nathan Scott <nathans@sgi.com>
Signed-off-by: Christoph Hellwig <hch@sgi.com>

Showing 1 changed file with 9 additions and 0 deletions Side-by-side Diff

... ... @@ -301,6 +301,15 @@
301 301 }
302 302  
303 303 /*
  304 + * Version 1 directory format has never worked on Linux.
  305 + */
  306 + if (unlikely(!XFS_SB_VERSION_HASDIRV2(sbp))) {
  307 + cmn_err(CE_WARN,
  308 + "XFS: Attempted to mount file system using version 1 directory format");
  309 + return XFS_ERROR(ENOSYS);
  310 + }
  311 +
  312 + /*
304 313 * Until this is fixed only page-sized or smaller data blocks work.
305 314 */
306 315 if (unlikely(sbp->sb_blocksize > PAGE_SIZE)) {