2013-12-30 08:02:22

by Yongqiang Yang

[permalink] [raw]
Subject: Fwd: [PATCH] mkfs: default ipg exceeds blocksize * 8 in 64K bigalloc

If bigalloc is used and the cluster size is set to 64KB, then
default inodes per group exceeds blocksize * 8, this patch simply
fixes it. I am not sure if the fix is reasonable.

Signed-off-by: Yongqiang Yang <[email protected]>
---
lib/ext2fs/initialize.c | 2 ++
1 file changed, 2 insertions(+)

diff --git a/lib/ext2fs/initialize.c b/lib/ext2fs/initialize.c
index 62a19b3..916c12c 100644
--- a/lib/ext2fs/initialize.c
+++ b/lib/ext2fs/initialize.c
@@ -308,6 +308,8 @@ retry:
ext2fs_blocks_count(param));
super->s_clusters_per_group = super->s_blocks_per_group;
goto retry;
+ } else if (bigalloc_flag) {
+ ipg = fs->blocksize * 8;
} else {
retval = EXT2_ET_TOO_MANY_INODES;
goto cleanup;
--
1.8.5.2