Whamcloud - gitweb
LU-9501 mke2fs: avoid inode number error with large FS 11/27111/3
authorAlexey Lyashkov <alexey.lyashkov@seagate.com>
Mon, 15 May 2017 14:45:38 +0000 (17:45 +0300)
committerAndreas Dilger <andreas.dilger@intel.com>
Sat, 16 Sep 2017 01:37:40 +0000 (01:37 +0000)
Limit inodes count instead of error return, to use all inodes in
the filesystem.

Change-Id: I76ee0a6c11b099b8c17d90b0778e3c0f0cf1f60a
Signed-off-by: Alexey Lyashkov <alexey.lyashkov@seagate.com>
Reviewed-on: https://review.whamcloud.com/27111
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
misc/mke2fs.c

index 53c30ce..8280ca1 100644 (file)
@@ -2242,15 +2242,12 @@ profile_error:
                unsigned long long n;
                n = ext2fs_blocks_count(&fs_param) * blocksize / inode_ratio;
                if (n > MAX_32_NUM) {
-                       if (fs_param.s_feature_incompat &
-                           EXT4_FEATURE_INCOMPAT_64BIT)
-                               num_inodes = MAX_32_NUM;
-                       else {
+                       num_inodes = MAX_32_NUM;
+                       if (!(fs_param.s_feature_incompat &
+                           EXT4_FEATURE_INCOMPAT_64BIT))
                                com_err(program_name, 0,
-                                       _("too many inodes (%llu), raise "
-                                         "inode ratio?"), n);
-                               exit(1);
-                       }
+                                       _("too many inodes (%llu), reduced to "
+                                         "%llu"), n, MAX_32_NUM);
                }
        } else if (num_inodes > MAX_32_NUM) {
                com_err(program_name, 0,