diff options
author | Colin Cross <ccross@android.com> | 2011-04-29 16:45:48 -0700 |
---|---|---|
committer | Colin Cross <ccross@android.com> | 2011-04-29 16:49:10 -0700 |
commit | 96cc54a9bbc788673b7a38c23160d137211fd983 (patch) | |
tree | 5f2821d5fce3341e174d2bbceb7e29f82b9a3ac6 | |
parent | 9b4fcbda5b1cffe54e2b37c6133d48d1dfbd0247 (diff) | |
download | extras-96cc54a9bbc788673b7a38c23160d137211fd983.tar.gz |
Make inodes per group a multiple of inodes per block
Kernel version 2.6.37 and later refuse to write to filesystems
for which inodes per group is not divisible by inodes per block.
Round the inodes per group up.
Change-Id: I9eb4fb5dd616a8abfd2f1fdc4b7d05538a2fc8fe
-rw-r--r-- | ext4_utils/make_ext4fs.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ext4_utils/make_ext4fs.c b/ext4_utils/make_ext4fs.c index 87588ab6..e37d617d 100644 --- a/ext4_utils/make_ext4fs.c +++ b/ext4_utils/make_ext4fs.c @@ -215,7 +215,8 @@ static u32 compute_inodes_per_group() { u32 blocks = DIV_ROUND_UP(info.len, info.block_size); u32 block_groups = DIV_ROUND_UP(blocks, info.blocks_per_group); - return DIV_ROUND_UP(info.inodes, block_groups); + u32 inodes = DIV_ROUND_UP(info.inodes, block_groups); + return ALIGN(inodes, (info.block_size / info.inode_size)); } void reset_ext4fs_info() { |