diff mbox

mkfs: default ipg exceeds blocksize * 8 in 64K bigalloc

Message ID CAGBYx2aKccYzUov41aHuPXF3p_wKvRSOb=wHpDdH=sZd+MuQHw@mail.gmail.com
State New, archived
Headers show

Commit Message

Yongqiang Yang Dec. 30, 2013, 8:02 a.m. UTC
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 <xiaoqiangnk@gmail.com>
---
 lib/ext2fs/initialize.c | 2 ++
 1 file changed, 2 insertions(+)

--
1.8.5.2
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

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;