From: Ben Gras Date: Tue, 29 Sep 2009 12:14:35 +0000 (+0000) Subject: revert mkfs change; might run out of inodes, but large number of inodes X-Git-Tag: v3.1.5~72 X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/icons/zpipe.c?a=commitdiff_plain;h=699e4345eac9954b8e540c15f6a60067b55b44b7;p=minix.git revert mkfs change; might run out of inodes, but large number of inodes makes mkfs not want to mkfs large filesystems. find optimal formula (e.g. dynamic capping of no. of inodes) later. --- diff --git a/commands/simple/mkfs.c b/commands/simple/mkfs.c index 39a04410f..7fb72f5aa 100755 --- a/commands/simple/mkfs.c +++ b/commands/simple/mkfs.c @@ -266,9 +266,12 @@ char *argv[]; if (blocks == 0) pexit("Can't open prototype file"); } if (i == 0) { - u32_t kb = div64u(mul64u(blocks, block_size), 1024); - i = kb / 2; - if (kb >= 100000) i = kb / 4; + i = blocks / 2; + if (blocks >= 20000) i = blocks / 3; + if (blocks >= 40000) i = blocks / 4; + if (blocks >= 60000) i = blocks / 5; + if (blocks >= 80000) i = blocks / 6; + if (blocks >= 100000) i = blocks / 7; /* round up to fill inode block */ i += inodes_per_block - 1;