From: Alexey Lyashkov Date: Mon, 15 May 2017 14:45:38 +0000 (+0300) Subject: LU-9501 mke2fs: avoid inode number error with large FS X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=ec44b0534beb51ce70bb9b997cbbad2476506b2a;p=tools%2Fe2fsprogs.git LU-9501 mke2fs: avoid inode number error with large FS Limit inodes count instead of error return, to use all inodes in the filesystem. Change-Id: I76ee0a6c11b099b8c17d90b0778e3c0f0cf1f60a Signed-off-by: Alexey Lyashkov Reviewed-on: https://review.whamcloud.com/27111 Tested-by: Jenkins Reviewed-by: Andreas Dilger Tested-by: Maloo --- diff --git a/misc/mke2fs.c b/misc/mke2fs.c index 53c30ce..8280ca1 100644 --- a/misc/mke2fs.c +++ b/misc/mke2fs.c @@ -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,