patch-2.1.88 linux/fs/buffer.c
Next file: linux/fs/coda/psdev.c
Previous file: linux/fs/adfs/super.c
Back to the patch index
Back to the overall index
- Lines: 19
- Date:
Thu Feb 19 01:09:47 1998
- Orig file:
v2.1.87/linux/fs/buffer.c
- Orig date:
Thu Jan 15 21:01:04 1998
diff -u --recursive --new-file v2.1.87/linux/fs/buffer.c linux/fs/buffer.c
@@ -52,10 +52,14 @@
#define NR_RESERVED (2*MAX_BUF_PER_PAGE)
#define MAX_UNUSED_BUFFERS NR_RESERVED+20 /* don't ever have more than this
number of unused buffer heads */
-#define HASH_PAGES 4 /* number of pages to use for the hash table */
-#define HASH_PAGES_ORDER 2
-#define NR_HASH (HASH_PAGES*PAGE_SIZE/sizeof(struct buffer_head *))
-#define HASH_MASK (NR_HASH-1)
+
+/*
+ * How large a hash table do we need?
+ */
+#define HASH_PAGES_ORDER 4
+#define HASH_PAGES (1UL << HASH_PAGES_ORDER)
+#define NR_HASH (HASH_PAGES*PAGE_SIZE/sizeof(struct buffer_head *))
+#define HASH_MASK (NR_HASH-1)
static int grow_buffers(int pri, int size);
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov