From: Ben Gras Date: Tue, 6 Nov 2007 16:55:48 +0000 (+0000) Subject: hack to avoid firstdatazone overflow problem when no. of X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/icons/zlib_tech.html?a=commitdiff_plain;h=741f3678e9f5804d6505869fab21c02fe7a9402c;p=minix.git hack to avoid firstdatazone overflow problem when no. of inodes gets too large. real solution (computing firstdatazone instead of storing it in the superblock) to follow on trunk. --- diff --git a/commands/simple/mkfs.c b/commands/simple/mkfs.c index efcf3abe3..c6ee19719 100755 --- a/commands/simple/mkfs.c +++ b/commands/simple/mkfs.c @@ -33,6 +33,8 @@ #include #include +#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;