Whamcloud - gitweb
LU-16971 ext2fs: make sure we have at least EXT2_FIRST_INO + 1 inodes 22/51722/2
authorLi Dongyang <dongyangli@ddn.com>
Thu, 20 Jul 2023 12:43:31 +0000 (22:43 +1000)
committerAndreas Dilger <adilger@whamcloud.com>
Mon, 7 Aug 2023 14:08:49 +0000 (14:08 +0000)
commite72ec8ac6e540877a452c953c69602d6739ac62f
tree308e92b8df348cb04491b0717b8c22271554cdad
parent9cd756fb8c83d389662dc0c3a9ea8fece949b196
LU-16971 ext2fs: make sure we have at least EXT2_FIRST_INO + 1 inodes

When creating a small fs with 100 1k blocks, mke2fs fails with:

Creating filesystem with 100 1k blocks and 8 inodes

Allocating group tables: done
Writing inode tables: done
ext2fs_mkdir: Could not allocate inode in ext2 filesystem while creating /lost+found

Increase s_inodes_per_group with a step of 8 to make
sure we have at least EXT2_FIRST_INO + 1 inodes.

Change-Id: I5ac30bdadf72e17780ebef93b2e81365a8a90641
Signed-off-by: Li Dongyang <dongyangli@ddn.com>
Reviewed-on: https://review.whamcloud.com/c/tools/e2fsprogs/+/51722
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
lib/ext2fs/initialize.c