Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!uflorida!stat!vsserv!nu.cs.fsu.edu!nall From: nall@nu.cs.fsu.edu (John Nall) Newsgroups: comp.os.minix Subject: Re: Large Disks Message-ID: <243@vsserv.scri.fsu.edu> Date: 4 Oct 89 14:24:22 GMT Sender: news@vsserv.scri.fsu.edu Reply-To: nall@nu.cs.fsu.edu (John Nall) Organization: Florida State University Lines: 85 The following are the (very minor) changes to mkfs.c which will allow it to make a file system greater than 32 MB. No guarantees come with the code, but I have tested it fairly extensively, making a 40 MB partition (checks out mkfs), copying most of an existing 20 MB partition to it (checks out at_wini), and doing random checks on the resulting files. (A du of both partitions looked good). I also used fsck on the 40 MB partition, and it appears successful. One minor problem which I have not fixed -- df prints out negative numbers when the number of blocks is greater than 32K. I looked at the code in df, and it is more of a hassle to fix it than it is worth right now (the negative number is easily mentally converted to the right value). This is, of course, a listing from cdiff. ---------------------------cut here------------------ *** /usr/minix/tools/mkfs.c Thu Jul 13 10:43:31 1989 --- /usr/minix/commands/mkfs.c Tue Oct 3 16:06:41 1989 *************** *** 45,52 **** #define BIN 2 #define BINGRP 2 #define BIT_MAP_SHIFT 13 ! #define N_BLOCKS 32000 /* must be multiple of 8 */ ! #ifdef DOS # define BREAD 4 # define BWRITE 5 --- 45,52 ---- #define BIN 2 #define BINGRP 2 #define BIT_MAP_SHIFT 13 ! #define N_BLOCKS 65528 /* must be multiple of 8 */ ! /* (65536 is a no-no) */ #ifdef DOS # define BREAD 4 # define BWRITE 5 *************** *** 56,65 **** #endif ! int next_zone, next_inode, zone_size, zone_shift=0, zoff, nrblocks,inode_offset, ! nrinodes, lct=1, disk, fd, print=0, file=0, override=0, simple=0, dflag; ! int donttest; /* skip test if it fits on medium */ ! long current_time, bin_time; char zero[BLOCK_SIZE], *lastp; char umap[(N_BLOCKS+8)/8]; /* bit map tells if block read yet */ --- 56,65 ---- #endif ! int next_zone, next_inode, zone_size, zone_shift=0, zoff, inode_offset, ! nrinodes, lct=1, disk, fd, print=0, file=0, override=0, simple=0, dflag; ! int donttest; /* skip test if it fits on medium */ ! unsigned int nrblocks; long current_time, bin_time; char zero[BLOCK_SIZE], *lastp; char umap[(N_BLOCKS+8)/8]; /* bit map tells if block read yet */ *************** *** 79,86 **** int argc; char *argv[]; { ! int i, blocks, zones, inodes, mode, usrid, grpid, badusage = 0; ! char *token[MAX_TOKENS], line[LINE_LEN]; FILE *fopen(); long time(), ls; struct stat statbuf; --- 79,87 ---- int argc; char *argv[]; { ! int i, zones, inodes, mode, usrid, grpid, badusage = 0; ! char *token[MAX_TOKENS], line[LINE_LEN]; ! unsigned int blocks; FILE *fopen(); long time(), ls; struct stat statbuf; ====================================================================== John Nall Internet: nall@nu.cs.fsu.edu Computer Science Department Florida State University "Today, a Moon Moth -- tomorrow, a Sea Dragon Conquerer!!"