Whamcloud - gitweb
e2fsck: add support for dirdata feature
[tools/e2fsprogs.git] / misc / mke2fs.c
index afbcf48..2553290 100644 (file)
@@ -1163,6 +1163,7 @@ static __u32 ok_features[3] = {
                EXT4_FEATURE_INCOMPAT_FLEX_BG|
                EXT4_FEATURE_INCOMPAT_EA_INODE|
                EXT4_FEATURE_INCOMPAT_MMP |
+               EXT4_FEATURE_INCOMPAT_DIRDATA|
                EXT4_FEATURE_INCOMPAT_64BIT|
                EXT4_FEATURE_INCOMPAT_INLINE_DATA|
                EXT4_FEATURE_INCOMPAT_ENCRYPT |
@@ -3049,6 +3050,19 @@ int main (int argc, char *argv[])
                exit(1);
        }
 
+       if (ext2fs_has_feature_dirdata(fs->super)) {
+               if (ext2fs_has_feature_inline_data(fs->super)) {
+                       printf("%s", _("The dirdata feature can not enabled "
+                                      "with inline data feature.\n"));
+                       exit(1);
+               }
+               if (ext2fs_has_feature_casefold(fs->super)) {
+                       printf("%s", _("The dirdata feature can not enabled "
+                                      "with casefold feature.\n"));
+                       exit(1);
+               }
+       }
+
        /* Calculate journal blocks */
        if (!journal_device && ((journal_size) ||
            ext2fs_has_feature_journal(&fs_param)))