]> Zhao Yanbai Git Server - minix.git/commitdiff
hack to avoid firstdatazone overflow problem when no. of
authorBen Gras <ben@minix3.org>
Tue, 6 Nov 2007 16:55:48 +0000 (16:55 +0000)
committerBen Gras <ben@minix3.org>
Tue, 6 Nov 2007 16:55:48 +0000 (16:55 +0000)
inodes gets too large. real solution (computing firstdatazone
instead of storing it in the superblock) to follow on trunk.

commands/simple/mkfs.c

index efcf3abe38d7a47b93c8da78142c463efbca9f3b..c6ee197199e0c9c0dd9aaaa894afec1d4434bc1d 100755 (executable)
@@ -33,6 +33,8 @@
 #include <tools.h>
 #include <dirent.h>
 
+#define MAX_INODES (2*1024*1024)
+
 #undef EXTERN
 #define EXTERN                 /* get rid of EXTERN by making it null */
 #include "../../servers/mfs/super.h"
@@ -317,6 +319,11 @@ char *argv[];
        simple = 1;
   }
 
+  if(inodes > MAX_INODES) {
+       inodes = MAX_INODES;
+       fprintf(stderr, "capping no. of inodes to %lu.\n", inodes);
+  }
+
   nrblocks = blocks;
   nrinodes = inodes;