From: Ben Gras Date: Fri, 20 May 2005 12:40:46 +0000 (+0000) Subject: Changed something in default no. of inodes in mkfs (I run out of inodes X-Git-Tag: v3.1.0~824 X-Git-Url: http://zhaoyanbai.com/repos/man.genrandom.html?a=commitdiff_plain;h=64ecaca24b85979aa5922c6cbffa8d3aa2c8f1a5;p=minix.git Changed something in default no. of inodes in mkfs (I run out of inodes often with the defaults). Made setup script not make root filesystem with 1kB filesystem blocks, as that restriction is out of the boot monitor now. --- diff --git a/commands/scripts/setup.sh b/commands/scripts/setup.sh index 97a6f04ee..a264703b9 100755 --- a/commands/scripts/setup.sh +++ b/commands/scripts/setup.sh @@ -316,7 +316,7 @@ echo " Copying $fdroot to /dev/$root " -mkfs -B 1024 /dev/$root || exit +mkfs /dev/$root || exit mount /dev/$root /mnt || exit if [ -d /boot ] then diff --git a/commands/simple/mkfs.c b/commands/simple/mkfs.c index 0e1637b54..25278294e 100755 --- a/commands/simple/mkfs.c +++ b/commands/simple/mkfs.c @@ -268,18 +268,18 @@ char *argv[]; if (i == 0) { int kb; kb = blocks * (min(block_size,1024) / 1024); - /* The default for inodes is 3 blocks per inode, rounded up + /* The default for inodes is 2 blocks per kb, rounded up * to fill an inode block. Above 20M, the average files are * sure to be larger because it is hard to fill up 20M with * tiny files, so reduce the default number of inodes. This * default can always be overridden by using the '-i option. */ - i = kb / 3; - if (kb >= 20000) i = kb / 4; - if (kb >= 40000) i = kb / 5; - if (kb >= 60000) i = kb / 6; - if (kb >= 80000) i = kb / 7; - if (kb >= 100000) i = kb / 8; + i = kb / 2; + if (kb >= 20000) i = kb / 3; + if (kb >= 40000) i = kb / 4; + if (kb >= 60000) i = kb / 5; + if (kb >= 80000) i = kb / 6; + if (kb >= 100000) i = kb / 7; i += inodes_per_block - 1; i = i / inodes_per_block * inodes_per_block; if (i > INODE_MAX) i = INODE_MAX;