From 4d3bdd74b96b6361f98a9a4b27d5680938e01838 Mon Sep 17 00:00:00 2001 From: "Michael I. Bushnell" Date: Fri, 23 Sep 1994 21:40:50 +0000 Subject: Formerly main.c.~20~ --- ufs/main.c | 25 +++++++------------------ 1 file changed, 7 insertions(+), 18 deletions(-) diff --git a/ufs/main.c b/ufs/main.c index 5fd1ff11..2f3aad09 100644 --- a/ufs/main.c +++ b/ufs/main.c @@ -150,6 +150,9 @@ main (int argc, char **argv) /* Map the entire disk. */ create_disk_pager (); + /* Start the first request thread, to handle RPCs and page requests. */ + diskfs_spawn_first_thread (); + err = vm_map (mach_task_self (), (vm_address_t *)&disk_image, diskpagersize, 0, 1, diskpagerport, 0, 0, VM_PROT_READ | (diskfs_readonly ? 0 : VM_PROT_WRITE), @@ -157,30 +160,20 @@ main (int argc, char **argv) VM_INHERIT_NONE); assert (!err); - if (diskpagersize < sblock->fs_size * sblock->fs_fsize) - { - fprintf (stderr, - "Disk size %d less than necessary " - "(superblock says we need %ld)\n", - sizes[DEV_GET_SIZE_DEVICE_SIZE], - sblock->fs_size * sblock->fs_fsize); - exit (1); - } - get_hypermetadata (); - /* Check to make sure device size is big enough. */ - if (sizes[DEV_GET_SIZE_DEVICE_SIZE] != 0) - if (sizes[DEV_GET_SIZE_DEVICE_SIZE] < sblock->fs_size * sblock->fs_fsize) + if (diskpagersize < sblock->fs_size * sblock->fs_fsize) { fprintf (stderr, - "Disk size %d less than necessary " + "Disk size (%d) less than necessary " "(superblock says we need %ld)\n", sizes[DEV_GET_SIZE_DEVICE_SIZE], sblock->fs_size * sblock->fs_fsize); exit (1); } + vm_allocate (mach_task_self (), &zeroblock, sblock->fs_bsize, 1); + /* If the filesystem has new features in it, don't pay attention to the user's request not to use them. */ if ((sblock->fs_inodefmt == FS_44INODEFMT @@ -201,10 +194,6 @@ main (int argc, char **argv) inode_init (); pager_init (); - /* Start the first request thread, to handle RPCs and page requests - resulting from warp_root below. */ - diskfs_spawn_first_thread (); - /* Find our root node. */ warp_root (); -- cgit v1.2.3