]> git.karo-electronics.de Git - linux-beck.git/commitdiff
xfs: don't need dirv2 checks anymore
authorDave Chinner <dchinner@redhat.com>
Mon, 19 May 2014 21:46:55 +0000 (07:46 +1000)
committerDave Chinner <david@fromorbit.com>
Mon, 19 May 2014 21:46:55 +0000 (07:46 +1000)
If the the V2 directory feature bit is not set in the superblock
feature mask the filesystem will fail the good version check.
Hence we don't need any other version checking on the dir2 feature
bit in the code as the filesystem will not mount without it set.
Remove the checking code.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Dave Chinner <david@fromorbit.com>
fs/xfs/xfs_dir2.c
fs/xfs/xfs_fsops.c
fs/xfs/xfs_sb.c
fs/xfs/xfs_sb.h

index fda46253966a5cac252e593e14181da56f252700..0c8ba87a1e7abe24838bbe9592a535b6ce833004 100644 (file)
@@ -92,7 +92,7 @@ xfs_dir_mount(
        int     nodehdr_size;
 
 
-       ASSERT(xfs_sb_version_hasdirv2(&mp->m_sb));
+       ASSERT(mp->m_sb.sb_versionnum & XFS_SB_VERSION_DIRV2BIT);
        ASSERT((1 << (mp->m_sb.sb_blocklog + mp->m_sb.sb_dirblklog)) <=
               XFS_MAX_BLOCKSIZE);
 
index d49c67acabf86fbd1c31adbd5ae01a26ea9b7ead..b19b015769449c8f40ab75ce22f18b0ceec08220 100644 (file)
@@ -75,6 +75,7 @@ xfs_fs_geometry(
        if (new_version >= 3) {
                geo->version = XFS_FSOP_GEOM_VERSION;
                geo->flags = XFS_FSOP_GEOM_FLAGS_NLINK |
+                            XFS_FSOP_GEOM_FLAGS_DIRV2 |
                        (xfs_sb_version_hasattr(&mp->m_sb) ?
                                XFS_FSOP_GEOM_FLAGS_ATTR : 0) |
                        (xfs_sb_version_hasquota(&mp->m_sb) ?
@@ -87,8 +88,6 @@ xfs_fs_geometry(
                                XFS_FSOP_GEOM_FLAGS_SHARED : 0) |
                        (xfs_sb_version_hasextflgbit(&mp->m_sb) ?
                                XFS_FSOP_GEOM_FLAGS_EXTFLG : 0) |
-                       (xfs_sb_version_hasdirv2(&mp->m_sb) ?
-                               XFS_FSOP_GEOM_FLAGS_DIRV2 : 0) |
                        (xfs_sb_version_hassector(&mp->m_sb) ?
                                XFS_FSOP_GEOM_FLAGS_SECTOR : 0) |
                        (xfs_sb_version_hasasciici(&mp->m_sb) ?
index 8baf61afae1ddf132757caad16c359ec447dcc39..de16dd558195f29b99dda9545f9c7a2e966edd52 100644 (file)
@@ -333,15 +333,6 @@ xfs_mount_validate_sb(
                xfs_warn(mp, "Offline file system operation in progress!");
                return XFS_ERROR(EFSCORRUPTED);
        }
-
-       /*
-        * Version 1 directory format has never worked on Linux.
-        */
-       if (unlikely(!xfs_sb_version_hasdirv2(sbp))) {
-               xfs_warn(mp, "file system using version 1 directory format");
-               return XFS_ERROR(ENOSYS);
-       }
-
        return 0;
 }
 
index a2826cf57d78fdb6150b06ec59ecc431abbf7097..822e62819741752db7a2cc9f2a531f29d4a41ca7 100644 (file)
@@ -403,12 +403,6 @@ static inline bool xfs_sb_version_hasshared(struct xfs_sb *sbp)
                (sbp->sb_versionnum & XFS_SB_VERSION_SHAREDBIT);
 }
 
-static inline bool xfs_sb_version_hasdirv2(struct xfs_sb *sbp)
-{
-       return XFS_SB_VERSION_NUM(sbp) == XFS_SB_VERSION_5 ||
-              (sbp->sb_versionnum & XFS_SB_VERSION_DIRV2BIT);
-}
-
 static inline bool xfs_sb_version_haslogv2(struct xfs_sb *sbp)
 {
        return XFS_SB_VERSION_NUM(sbp) == XFS_SB_VERSION_5 ||