diff -Nurd elks.59/RELNOTES elks/RELNOTES --- elks.59/RELNOTES Tue Apr 29 20:14:18 1997 +++ elks/RELNOTES Thu May 1 20:32:26 1997 @@ -1,4 +1,31 @@ +VERSION 0.0.60 NOTES 5/1/97 ~7:30PM +-------------------- + + (I was intending to make this 0.0.59.2, but given the magnitude of the +(hopefully) fixed bug, I'm gonna bump it up to 0.0.60 just so everyone knows +that they really need it :) + + This fixes a couple of *serious* doshd.c bugs - one of which was +a complete error on my part... I thought the diskparm block was below 0x200:0 +and it wasn't. I've fixed this and it now runs on my machine outside of +dosemu (why is why I never saw the bug!) + + It's also a bit smaller than 0.0.59, but there are few other changes. +There will probably be a couple more 0.0.60.x releases over the next week +to clean up some stuff. + +VERSION 0.0.59.1 NOTES 4/30/1997 11:33PM +---------------------- + + Some minor cleanups for size: + + Got rid of the inode hash table code (~500 bytes) + Removed keyboard_init since it did *nothing*... + + Still have to fix the reported bugs on some hardware (esp. disk +detection code) + VERSION 0.0.59 NOTES -------------------- diff -Nurd elks.59/arch/i86/drivers/block/doshd.c elks/arch/i86/drivers/block/doshd.c --- elks.59/arch/i86/drivers/block/doshd.c Tue Apr 29 17:17:36 1997 +++ elks/arch/i86/drivers/block/doshd.c Thu May 1 20:38:06 1997 @@ -213,7 +213,7 @@ while (!dma_avail) sleep_on(&dma_wait); dma_avail = 0; - bufseg = 0x200; + bufseg = 0x800; count = 0; for (i = 0; i < 6; i++) @@ -457,14 +457,14 @@ BD_IRQ = BIOSHD_INT; if (CURRENT->cmd == WRITE) { BD_AX = BIOSHD_WRITE | this_pass; - fmemcpy(0x200, 0, get_ds(), buff, (this_pass * 512)); + fmemcpy(0x800, 0, get_ds(), buff, (this_pass * 512)); } else { BD_AX = BIOSHD_READ | this_pass; } BD_BX = 0; - BD_ES = 0x200; + BD_ES = 0x800; BD_CX = (cylinder << 8) | ((cylinder >> 2) & 0xc0) | sector; BD_DX = (head << 8) | hd_drive_map[drive]; BD_FL = 0; @@ -492,7 +492,7 @@ continue; /* try again */ } if (CURRENT->cmd==READ) { - fmemcpy(get_ds(), buff, 0x200, 0, (this_pass * 512)); + fmemcpy(get_ds(), buff, 0x800, 0, (this_pass * 512)); } /* In case it's already been freed */ if (!dma_avail) { diff -Nurd elks.59/arch/i86/drivers/block/doshd.c.orig elks/arch/i86/drivers/block/doshd.c.orig --- elks.59/arch/i86/drivers/block/doshd.c.orig Tue Apr 29 17:17:36 1997 +++ elks/arch/i86/drivers/block/doshd.c.orig Wed Dec 31 16:00:00 1969 @@ -1,593 +0,0 @@ -/* doshd.c */ -/* Copyright (C) 1994 Yggdrasil Computing, Incorporated - 4880 Stevens Creek Blvd. Suite 205 - San Jose, CA 95129-1034 - USA - Tel (408) 261-6630 - Fax (408) 261-6631 - - This file is part of the Linux Kernel - - Linux is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - - Linux is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with Linux; see the file COPYING. If not, write to - the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ - - -#include -#include -#include -#include -/*#include */ -#include -#include -#include -#include -#include -#include -/*#include */ -#include -#include - -#define MAJOR_NR BIOSHD_MAJOR -#define BIOSDISK -#include "blk.h" - -static int bioshd_ioctl(); -static int bioshd_open(); -static void bioshd_release(); - -static struct file_operations bioshd_fops = -{ - NULL, /* lseek - default */ - block_read, /* read - general block-dev read */ - block_write, /* write - general block-dev write */ - NULL, /* readdir - bad */ - NULL, /* select */ - bioshd_ioctl, /* ioctl */ - bioshd_open, /* open */ - bioshd_release, /* release */ - NULL, /* fsync */ - NULL, /* check_media_change */ - NULL, /* revalidate */ -}; - -static struct wait_queue *busy_wait = NULL; -static struct wait_queue dma_wait; -static int dma_avail = 1; - -static int bioshd_initialized = 0; -static int force_bioshd; -static int revalidate_hddisk(); -static struct -{ - int cylinders; - int sectors; - int heads; - int maxsectors; -} -drive_info[4]; - -static struct hd_struct hd[4 << 6]; -static char busy[4] = -{0,}; -static int access_count[4] = -{0,}; -static unsigned char hd_drive_map[4] = -{ - 0x80, 0x81, /* hda, hdb */ - 0x00, 0x01 /* fda, fdb */ -}; - -static void bioshd_geninit(); - -static int bioshd_sizes[4 << 6] = -{0,}; - -static struct gendisk bioshd_gendisk = -{ - MAJOR_NR, /* Major number */ - "hd", /* Major name */ - 6, /* Bits to shift to get real from partition */ - 1 << 6, /* Number of partitions per real */ - 4, /* maximum number of real */ - bioshd_geninit, /* init function */ - hd, /* hd struct */ - bioshd_sizes, /* sizes not blocksizes */ - 0, /* number */ - (void *) drive_info, /* internal */ - NULL /* next */ -}; - -/* This function checks to see which hard drives are active and sets up the - * drive_info[] table for them. Ack this is darned confusing... */ - -int bioshd_gethdinfo() -{ - int drive, ndrives = 0; - - for (drive = 0; drive <= 1; drive++) { - ndrives++; - BD_AX = 0x0800; - BD_DX = drive + 0x80; - BD_IRQ = 0x13; - call_bios(); - if (!CARRY_SET) { - drive_info[drive].cylinders = ((BD_CX >> 8) & 255); - drive_info[drive].cylinders += - (((BD_CX >> 6) & 3) * 256); - drive_info[drive].heads = ((BD_DX >> 8) & 63) + 1; - drive_info[drive].sectors = (BD_CX & 63); - drive_info[drive].maxsectors = - drive_info[drive].sectors; - } - } - return ndrives; -} - -static void - bioshd_release(inode, filp) - struct inode *inode; - struct file *filp; -{ - int target; - sync_dev(inode->i_rdev); - - target = DEVICE_NR(inode->i_rdev); - access_count[target]--; - return; -} - -/* As far as I can tell this doesn't actually - work, but we might as well try it. - -- Some XT controllers are happy with it.. [AC] - */ - -static void reset_bioshd(minor) - int minor; -{ - BD_IRQ = BIOSHD_INT; - BD_AX = BIOSHD_RESET; - BD_DX = hd_drive_map[DEVICE_NR(minor)]; - - call_bios(); - if (CARRY_SET || (BD_AX & 0xff00) != 0) - printk("hd: unable to reset.\n"); - return; -} - -static int - bioshd_open(inode, filp) - struct inode *inode; - struct file *filp; -{ - int target; - target = DEVICE_NR(inode->i_rdev); - - /* Bounds testing */ - - if (bioshd_initialized == 0) - return (-ENXIO); - if (target >= 4) - return (-ENXIO); - if (hd[MINOR(inode->i_rdev)].start_sect == -1) - return (-ENXIO); - - /* Wait until it's free */ - - while (busy[target]) - sleep_on(&busy_wait); - - /* Register that we're using the device */ - - access_count[target]++; - - /* Check the disc type */ - - drive_info[target].sectors = drive_info[target].maxsectors; - - /* Currently, this can only differentiate between 1.4MB and 720kB - discs. It does this by trying to read sector 10 of track 0. If - it succeeds, it assumes that there are 18 sectors, if not 9. */ - - if (target >= 2) - { - int bufseg; - int count; - int i; - static int test_disk [6] = {8,9,15,18,39,79}; - - printk("hd: probing disc in /dev/fd%d\n", target % 2); - - /* The area between 32-64K is a 'scratch' area - we - * need a semaphore for it */ - - while (!dma_avail) sleep_on(&dma_wait); - dma_avail = 0; - bufseg = 0x800; - - count = 0; - for (i = 0; i < 6; i++) - { - count = 0; - - while (count < 3) - { - /* BIOS read sector */ - - BD_IRQ = BIOSHD_INT; - BD_AX = BIOSHD_READ | 1; /* Read 1 sector */ - BD_BX = 0; /* Seg offset = 0 */ - BD_ES = bufseg; /* Segment to read to */ - if (test_disk[i] > 18) - { - BD_CX = (test_disk[i]<<8)|1; - } - else - { - BD_CX = (0<<8)|test_disk[i]; - } - BD_DX = (0 << 8) | hd_drive_map[target]; /* Head 0, drive number */ - BD_FL = 0; - - sti(); - call_bios(); - - if (CARRY_SET) - { - if (((BD_AX >> 8) == 0x04) && (count == 2)) - /* Sector not found */ - break; - - reset_bioshd(hd_drive_map[target]); - count++; - } else - if (test_disk[i] > 18) - { - drive_info[target].cylinders = test_disk[i] + 1; - } - else - { - drive_info[target].sectors = test_disk[i]; - } - break; - } - - } - - if (drive_info[target].cylinders == 0 || drive_info[target].sectors == 0) - printk("hd: Autoprobe failed!\n"); - - printk("hd: disc in /dev/fd%d probably has %d sectors and %d cylinders\n", target % 2, - drive_info[target].sectors, drive_info[target].cylinders); - -/* - * This is not a bugfix, hence no code, but coders should be aware - * that multi-sector reads from this point on depend on bootsect - * modifying the default Disk Parameter Block in BIOS. - * dpb[4] should be set to a high value such as 36 so that reads - * can go past what is hardwired in the BIOS. - * 36 is the number of sectors in a 2.88 floppy track. - * If you are booting ELKS with anything other than bootsect you - * have to make equivalent arrangements. - * 0:0x78 contains address of dpb (char dpb[12]), and dpb[4] is the End of - * Track parameter for the 765 Floppy Disk Controller. - * You may have to copy dpb to RAM as the original is in ROM. - */ - } - dma_avail = 1; - wake_up(&dma_wait); - return 0; -} - -void init_bioshd() -{ - int i; - int count = 0; - int hdcount = 0; - struct gendisk *ptr; - int addr = 0x8c; - - printk("hd Driver Copyright (C) 1994 Yggdrasil Computing, Inc.\nExtended and modified for Linux8086 by Alan Cox.\n"); - -#if 1 - if (bioshd_gethdinfo()) { - for (i = 0; i <= 1; i++) { - if (drive_info[i].heads) {count++; hdcount++;} - } - } -#endif - - /* - * Now we need to check to see if the driver is in place and - * determine how many floppy disks we are dealing with. - */ - - for (i = 2; i < 4; i++) - { - if (drive_info[i].heads = setupw(addr)) - { - count++; - if (i < 2) - hdcount++; - } - drive_info[i].sectors = drive_info[i].maxsectors = setupw(addr + 2); - drive_info[i].cylinders = setupw(addr + 4); - addr += 6; - } - - if (!count) - return; - - printk("hd: found %d drive%c\n", count, count == 1 ? ' ' : 's'); - - for (i = 0; i < 4; i++) - { - if (drive_info[i].heads != 0) - { - printk("/dev/%cd%c: %d heads, %d cylinders, %d sectors = %ld %s\n", - (i < 2 ? 'h' : 'f'), (i % 2) + (i < 2 ? 'a' : '0'), - drive_info[i].heads, - drive_info[i].cylinders, - drive_info[i].sectors, - (long) drive_info[i].heads * drive_info[i].cylinders * - drive_info[i].sectors * 512L / (1024L * (i < 2 ? 1024L : 1L)), - (i < 2 ? "MB" : "kB")); - } - } - bioshd_gendisk.nr_real = hdcount; - i = register_blkdev(MAJOR_NR, DEVICE_NAME, &bioshd_fops); - - if (i == 0) - { - blk_dev[MAJOR_NR].request_fn = DEVICE_REQUEST; - blksize_size[MAJOR_NR] = 1024; - read_ahead[MAJOR_NR] = 2; - if (gendisk_head == NULL) - { - bioshd_gendisk.next = gendisk_head; - gendisk_head = &bioshd_gendisk; - } else - { - for (ptr = gendisk_head; ptr->next != NULL; ptr = ptr->next) - ; - ptr->next = &bioshd_gendisk; - bioshd_gendisk.next = NULL; - } - bioshd_initialized = 1; - } else - printk("hd: unable to register\n"); -} - -static int bioshd_ioctl(inode, file, cmd, arg) - struct inode *inode; - struct file *file; - unsigned int cmd; - unsigned long arg; -{ - return -EINVAL; -} - - -static void do_bioshd_request() -{ - unsigned long count; - unsigned long this_pass; - short cylinder; - short head; - short sector; - unsigned long start; - int tmp; - char *buff; - int minor; - int errs; - int part; - int drive; - - while (1) - { - next_block: - - /* make sure we have a valid request */ - if (!CURRENT || CURRENT->dev < 0) - return; - - /* now initialize it */ - INIT_REQUEST; - - /* make sure it's still valid */ - if (CURRENT == NULL || CURRENT->sector == -1) - return; - - if (bioshd_initialized != 1) - { - end_request(0); - continue; - } - minor = MINOR(CURRENT->dev); - part = minor & ((1 << 6) - 1); - drive = minor >> 6; - - /* make sure it's a disk we are dealing with. */ - if (drive > 3 || drive < 0 || drive_info[drive].heads == -0) - { - printk("hd: non-existant drive\n"); - end_request(0); - continue; - } - count = CURRENT->nr_sectors; - start = CURRENT->sector; - buff = CURRENT->buffer; - - if (hd[minor].start_sect == -1 || start >= hd[minor].nr_sects) - { - printk("hd: bad partition start=%d sect=%d nr_sects=%d.\n", - start, (int) hd[minor].start_sect, (int) hd[minor].nr_sects); - end_request(0); - continue; - } - start += hd[minor].start_sect; - errs = 0; - - while (count > 0) - { - sector = (start % drive_info[drive].sectors) + 1; - tmp = start / drive_info[drive].sectors; - head = tmp % drive_info[drive].heads; - cylinder = tmp / drive_info[drive].heads; - - this_pass = count; - if (count <= (drive_info[drive].sectors - sector + 1)) - this_pass = count; - else - this_pass = drive_info[drive].sectors - sector + 1; - - while (!dma_avail) sleep_on(&dma_wait); - dma_avail = 0; - - BD_IRQ = BIOSHD_INT; - if (CURRENT->cmd == WRITE) { - BD_AX = BIOSHD_WRITE | this_pass; - fmemcpy(0x800, 0, get_ds(), buff, (this_pass * 512)); - } - else { - BD_AX = BIOSHD_READ | this_pass; - } - - BD_BX = 0; - BD_ES = 0x800; - BD_CX = (cylinder << 8) | ((cylinder >> 2) & 0xc0) | sector; - BD_DX = (head << 8) | hd_drive_map[drive]; - BD_FL = 0; -#if 0 - printk("cylinder=%d head=%d sector=%d drive=%d CMD=%d\n", - cylinder, head, sector, drive, CURRENT->cmd); - printk("blocks %d\n", this_pass); -#endif - - sti(); - call_bios(); - - if (CARRY_SET) - { - reset_bioshd(MINOR(CURRENT->dev)); - dma_avail = 1; - errs++; - if (errs > MAX_ERRS) - { - printk("hd: error: AX=0x%x\n", BD_AX); - end_request(0); - wake_up(&dma_wait); - goto next_block; - } - continue; /* try again */ - } - if (CURRENT->cmd==READ) { - fmemcpy(get_ds(), buff, 0x800, 0, (this_pass * 512)); - } - /* In case it's already been freed */ - if (!dma_avail) { - dma_avail = 1; - wake_up(&dma_wait); - } - count -= this_pass; - start += this_pass; - buff += this_pass * 512; - } - /* satisfied that request */ - end_request(1); - } -} - -#define DEVICE_BUSY busy[target] -#define USAGE access_count[target] -#define CAPACITY ((long)drive_info[target].heads*drive_info[target].sectors*drive_info[target].cylinders) -/* We assume that the the bios parameters do not change, so the disk capacity - will not change */ -#undef MAYBE_REINIT -#define GENDISK_STRUCT bioshd_gendisk - -/* - * This routine is called to flush all partitions and partition tables - * for a changed cdrom drive, and then re-read the new partition table. - * If we are revalidating a disk because of a media change, then we - * enter with usage == 0. If we are using an ioctl, we automatically have - * usage == 1 (we need an open channel to use an ioctl :-), so this - * is our limit. - */ -static int revalidate_hddisk(dev, maxusage) - int dev; - int maxusage; -{ - int target, major; - struct gendisk *gdev; - int max_p; - int start; - int i; - - target = DEVICE_NR(dev); - gdev = &GENDISK_STRUCT; - - cli(); - if (DEVICE_BUSY || USAGE > maxusage) - { - sti(); - return -EBUSY; - }; - DEVICE_BUSY = 1; - sti(); - - max_p = gdev->max_p; - start = target << gdev->minor_shift; - major = MAJOR_NR << 8; - - for (i = max_p - 1; i >= 0; i--) - { - sync_dev(major | start | i); - invalidate_inodes(major | start | i); - invalidate_buffers(major | start | i); - gdev->part[start + i].start_sect = 0; - gdev->part[start + i].nr_sects = 0; - }; - -#ifdef MAYBE_REINIT - MAYBE_REINIT; -#endif - - gdev->part[start].nr_sects = CAPACITY; - resetup_one_dev(gdev, target); - - DEVICE_BUSY = 0; - wake_up(&busy_wait); - return 0; -} - -static void bioshd_geninit() -{ - int i; - - for (i = 0; i < 4 << 6; i++) - { - if ((i & ((1 << 6) - 1)) == 0) - { - hd[i].start_sect = 0; - hd[i].nr_sects = (long) drive_info[i >> 6].sectors * - drive_info[i >> 6].heads * - drive_info[i >> 6].cylinders; - } else - { - hd[i].start_sect = -1; - hd[i].nr_sects = 0; - } - } - blksize_size[MAJOR_NR] = 1024; -} diff -Nurd elks.59/arch/i86/drivers/char/init.c elks/arch/i86/drivers/char/init.c --- elks.59/arch/i86/drivers/char/init.c Fri Apr 18 23:01:44 1997 +++ elks/arch/i86/drivers/char/init.c Wed Apr 30 21:36:33 1997 @@ -4,5 +4,5 @@ { /* rs_init(); */ /* lp_init(); */ - xtk_init(); + /* xtk_init(); */ } diff -Nurd elks.59/arch/i86/drivers/char/xt_key.c elks/arch/i86/drivers/char/xt_key.c --- elks.59/arch/i86/drivers/char/xt_key.c Tue Apr 29 20:03:06 1997 +++ elks/arch/i86/drivers/char/xt_key.c Wed Apr 30 21:34:56 1997 @@ -112,17 +112,6 @@ int AddQueue(); int GetQueue(); -int KeyboardInit(); - -/* Not for long... */ -void xtk_init() -{ - KeyboardInit(); -} - -int KeyboardInit() -{ -} /* * XT style keyboard I/O is almost civilised compared diff -Nurd elks.59/arch/i86/mm/malloc.c elks/arch/i86/mm/malloc.c --- elks.59/arch/i86/mm/malloc.c Mon Apr 28 23:00:53 1997 +++ elks/arch/i86/mm/malloc.c Thu May 1 20:23:20 1997 @@ -224,7 +224,7 @@ * - any memory is preallocated via chmem */ int sys_brk(len) -int len; +unsigned int len; { if ((len < (current->t_endtext)) || (len > (current->t_endstack - USTACK_BYTES))) { @@ -257,8 +257,8 @@ holes[0].extent = end-start; holes[0].refcount = 0; holes[1].flags=HOLE_FREE; - holes[1].page_base = 0x300; - holes[1].extent = (0xfff - 0x300); + holes[1].page_base = 0x900; + holes[1].extent = (0xfff - 0x900); holes[1].refcount = 0; holes[0].next = &holes[1]; } diff -Nurd elks.59/fs/inode.c elks/fs/inode.c --- elks.59/fs/inode.c Tue Apr 29 17:11:24 1997 +++ elks/fs/inode.c Thu May 1 00:32:49 1997 @@ -18,111 +18,12 @@ int event=0; -static struct inode_hash_entry { - struct inode * inode; - int updating; -} hash_table[NR_IHASH]; - static struct inode inode_block[NR_INODE]; -static struct inode * first_inode; +static struct inode * first_inode = inode_block; static struct wait_queue * inode_wait = NULL; -int nr_inodes = 0, nr_free_inodes = 0; +int nr_inodes = NR_INODE, nr_free_inodes = NR_INODE; int max_inodes = NR_INODE; -static struct inode_hash_entry *hash(dev,i) -kdev_t dev; -int i; -{ - return hash_table + ((HASHDEV(dev) ^ i) % NR_IHASH); -} - -static void insert_inode_free(inode) -struct inode *inode; -{ - inode->i_next = first_inode; - inode->i_prev = first_inode->i_prev; - inode->i_next->i_prev = inode; - inode->i_prev->i_next = inode; - first_inode = inode; -} - -static void remove_inode_free(inode) -struct inode *inode; -{ - if (first_inode == inode) - first_inode = first_inode->i_next; - if (inode->i_next) - inode->i_next->i_prev = inode->i_prev; - if (inode->i_prev) - inode->i_prev->i_next = inode->i_next; - inode->i_next = inode->i_prev = NULL; -} - -void insert_inode_hash(inode) -struct inode *inode; -{ - struct inode_hash_entry *h; - h = hash(inode->i_dev, inode->i_ino); - - inode->i_hash_next = h->inode; - inode->i_hash_prev = NULL; - if (inode->i_hash_next) - inode->i_hash_next->i_hash_prev = inode; - h->inode = inode; -} - -static void remove_inode_hash(inode) -struct inode *inode; -{ - struct inode_hash_entry *h; - h = hash(inode->i_dev, inode->i_ino); - - if (h->inode == inode) - h->inode = inode->i_hash_next; - if (inode->i_hash_next) - inode->i_hash_next->i_hash_prev = inode->i_hash_prev; - if (inode->i_hash_prev) - inode->i_hash_prev->i_hash_next = inode->i_hash_next; - inode->i_hash_prev = inode->i_hash_next = NULL; -} - -static void put_last_free(inode) -struct inode *inode; -{ - remove_inode_free(inode); - if(first_inode) - { - inode->i_prev = first_inode->i_prev; - inode->i_prev->i_next = inode; - } - else - inode->i_prev = NULL; - inode->i_next = first_inode; - inode->i_next->i_prev = inode; -} - -void setup_inodes() -{ - struct inode * inode; - int i = NR_INODE; - - inode=&inode_block[0]; - - nr_inodes = i; - nr_free_inodes = i; - - for ( ; i ; i-- ) - insert_inode_free(inode++); -} - - -void inode_init() -{ - memset(hash_table, 0, sizeof(hash_table)); - first_inode = NULL; - setup_inodes(); -} - static void wait_on_inode(); static void lock_inode(inode) @@ -150,14 +51,11 @@ struct wait_queue * wait; wait_on_inode(inode); - remove_inode_hash(inode); - remove_inode_free(inode); wait = inode->i_wait; if (inode->i_count) nr_free_inodes++; memset(inode,0,sizeof(*inode)); inode->i_wait = wait; - insert_inode_free(inode); } int fs_may_mount(dev) @@ -449,6 +347,8 @@ return; } +/* Debugging code */ +#if 0 void list_inode_status() { int i; @@ -458,6 +358,7 @@ inode_block[i].i_count, inode_block[i].i_dev, inode_block[i].i_ino); } } +#endif struct inode * get_empty_inode() { @@ -477,7 +378,7 @@ inode = best; if (!inode) { printk("VFS: No free inodes - contact somebody other than Linus\n"); - list_inode_status(); +/* list_inode_status(); */ sleep_on(&inode_wait); goto repeat; } @@ -492,8 +393,7 @@ if (inode->i_count) goto repeat; clear_inode(inode); - inode->i_count = 1; - inode->i_nlink = 1; + inode->i_count = inode->i_nlink = 1; inode->i_version = ++event; #ifdef NOT_YET inode->i_sem.count = 1; @@ -543,24 +443,21 @@ int crossmntp; { static struct wait_queue * update_wait = NULL; - struct inode_hash_entry * h; struct inode * inode; struct inode * empty = NULL; + int i; printd_iget("iget called(%x, %d, %d)\n", sb, nr, crossmntp); if (!sb) panic("VFS: iget with sb==NULL"); - h = hash(sb->s_dev, nr); repeat: - for (inode = h->inode; inode ; inode = inode->i_hash_next) + for (inode = first_inode, i = 0; i < NR_INODE; i++, inode++) if (inode->i_dev == sb->s_dev && inode->i_ino == nr) goto found_it; if (!empty) { - h->updating++; printd_iget("iget: getting an empty inode...\n"); empty = get_empty_inode(); printd_iget("iget: got one... (%x)!\n", empty); - if (!--h->updating) wake_up(&update_wait); if (empty) goto repeat; @@ -571,8 +468,6 @@ inode->i_dev = sb->s_dev; inode->i_ino = nr; inode->i_flags = sb->s_flags; - put_last_free(inode); - insert_inode_hash(inode); printd_iget("iget: Reading inode\n"); read_inode(inode); printd_iget("iget: Read it\n"); @@ -599,10 +494,6 @@ iput(empty); return_it: - while (h->updating) { - printd_iget("iget: sleeping\n"); - sleep_on(&update_wait); - } return inode; } diff -Nurd elks.59/fs/minix/bitmap.c elks/fs/minix/bitmap.c --- elks.59/fs/minix/bitmap.c Mon Apr 28 22:58:39 1997 +++ elks/fs/minix/bitmap.c Wed Apr 30 21:42:08 1997 @@ -229,7 +229,6 @@ inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME; inode->i_op = NULL; inode->i_blocks = inode->i_blksize = 0; - insert_inode_hash(inode); return inode; /* Oh no! It's 'Return of Goto' in a double feature with 'Mozilla vs. Internet Exploder :) */ diff -Nurd elks.59/include/linuxmt/sched.h elks/include/linuxmt/sched.h --- elks.59/include/linuxmt/sched.h Tue Apr 29 20:14:28 1997 +++ elks/include/linuxmt/sched.h Wed Apr 30 19:29:57 1997 @@ -1,7 +1,7 @@ #ifndef LINUXMT_SCHED_H #define LINUXMT_SCHED_H -#define MAX_TASKS 16 +#define MAX_TASKS 15 #define NGROUPS 13 /* Supplementary groups */ #define NOGROUP 0xFFFF #define KSTACK_BYTES 1024 /* Size of kernel stacks */ diff -Nurd elks.59/init/main.c elks/init/main.c --- elks.59/init/main.c Tue Apr 29 20:10:32 1997 +++ elks/init/main.c Thu May 1 20:34:54 1997 @@ -44,9 +44,8 @@ tty_init(); buffer_init(); device_setup(); - inode_init(); fs_init(); - printk("ELKS version 0.0.58\n"); + printk("ELKS version 0.0.60\n"); /* #define TESTING */ #ifdef TESTING #if 1