]> git.ipfire.org Git - thirdparty/e2fsprogs.git/commitdiff
mke2fs: complain about creating 64bit filesystems without extents
authorDarrick J. Wong <darrick.wong@oracle.com>
Sat, 12 Oct 2013 01:20:22 +0000 (21:20 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Sat, 12 Oct 2013 01:20:22 +0000 (21:20 -0400)
A 64bit filesystem without extents is not terribly useful, because the
old block map format does not support pointing to high block numbers.
Warn the user who tries to create such an animal.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
misc/mke2fs.c

index 22c2815db1a54219dbb5ac112fb133c59f8f2a97..cc06a97ede6e3dbd084f1c45ca46092f2fcdbaaf 100644 (file)
@@ -1806,6 +1806,14 @@ profile_error:
                exit(1);
        }
 
+       /* Check the user's mkfs options for 64bit */
+       if ((fs_param.s_feature_incompat & EXT4_FEATURE_INCOMPAT_64BIT) &&
+           !(fs_param.s_feature_incompat & EXT3_FEATURE_INCOMPAT_EXTENTS)) {
+               printf(_("Extents MUST be enabled for a 64-bit filesystem.  "
+                        "Pass -O extents to rectify.\n"));
+               exit(1);
+       }
+
        /* Set first meta blockgroup via an environment variable */
        /* (this is mostly for debugging purposes) */
        if ((fs_param.s_feature_incompat & EXT2_FEATURE_INCOMPAT_META_BG) &&