Hi Marcelo,
The patch attached moves the MAX_BUF_PER_PAGE definition from the fs/*
files into include/linux/fs.h. It is defined now independly in 2 spearate
files in fs/ and we use it also in the NTFS-TNG (all definitions are
identical). Not much win, but it is IMHO the correct thing.
The similiar thing is already done in 2.5.x.
Please apply.
diff -Nur linux-2.4.19-pre8/fs/block_dev.c linux-2.4.19-pre8-1/fs/block_dev.c
--- linux-2.4.19-pre8/fs/block_dev.c Sun May 12 00:43:38 2002
+++ linux-2.4.19-pre8-1/fs/block_dev.c Sun May 12 00:26:03 2002
@@ -22,8 +22,6 @@
#include <asm/uaccess.h>
-#define MAX_BUF_PER_PAGE (PAGE_CACHE_SIZE / 512)
-
static unsigned long max_block(kdev_t dev)
{
unsigned int retval = ~0U;
diff -Nur linux-2.4.19-pre8/fs/buffer.c linux-2.4.19-pre8-1/fs/buffer.c
--- linux-2.4.19-pre8/fs/buffer.c Sun May 12 00:43:38 2002
+++ linux-2.4.19-pre8-1/fs/buffer.c Sun May 12 00:26:20 2002
@@ -54,7 +54,6 @@
#include <asm/bitops.h>
#include <asm/mmu_context.h>
-#define MAX_BUF_PER_PAGE (PAGE_CACHE_SIZE / 512)
#define NR_RESERVED (10*MAX_BUF_PER_PAGE)
#define MAX_UNUSED_BUFFERS NR_RESERVED+20 /* don't ever have more than this
number of unused buffer heads */
diff -Nur linux-2.4.19-pre8/include/linux/fs.h linux-2.4.19-pre8-1/include/linux/fs.h
--- linux-2.4.19-pre8/include/linux/fs.h Sun May 12 00:43:48 2002
+++ linux-2.4.19-pre8-1/include/linux/fs.h Sun May 12 01:03:50 2002
@@ -225,6 +225,8 @@
*/
};
+#define MAX_BUF_PER_PAGE (PAGE_CACHE_SIZE / 512)
+
/*
* Try to keep the most commonly used fields in single cache lines (16
* bytes) to improve performance. This ordering should be
pkot
-- mailto:pkot@linuxnews.pl :: mailto:pkot@slackware.pl http://kt.linuxnews.pl/ :: Kernel Traffic po polsku- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
This archive was generated by hypermail 2b29 : Tue May 14 2002 - 12:00:17 EST