patch-2.1.111 linux/fs/inode.c
Next file: linux/fs/lockd/svcsubs.c
Previous file: linux/fs/dcache.c
Back to the patch index
Back to the overall index
- Lines: 47
- Date:
Wed Jul 22 15:42:50 1998
- Orig file:
v2.1.110/linux/fs/inode.c
- Orig date:
Wed Jun 24 22:54:09 1998
diff -u --recursive --new-file v2.1.110/linux/fs/inode.c linux/fs/inode.c
@@ -65,7 +65,7 @@
int dummy[4];
} inodes_stat = {0, 0, 0,};
-int max_inodes = NR_INODE;
+int max_inodes;
/*
* Put the inode on the super block's dirty list.
@@ -537,6 +537,7 @@
inode->i_sb = NULL;
inode->i_dev = 0;
inode->i_ino = ++last_ino;
+ inode->i_flags = 0;
inode->i_count = 1;
inode->i_state = 0;
spin_unlock(&inode_lock);
@@ -733,11 +734,14 @@
}
/*
- * Initialize the hash tables
+ * Initialize the hash tables and default
+ * value for max inodes..
*/
+#define MAX_INODE (8192)
+
void inode_init(void)
{
- int i;
+ int i, max;
struct list_head *head = inode_hashtable;
i = HASH_SIZE;
@@ -746,6 +750,12 @@
head++;
i--;
} while (i);
+
+ /* Initial guess at reasonable inode number */
+ max = num_physpages >> 1;
+ if (max > MAX_INODE)
+ max = MAX_INODE;
+ max_inodes = max;
}
/* This belongs in file_table.c, not here... */
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov