lkml.org 
[lkml]   [2001]   [Dec]   [31]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
FromDaniel Phillips <>
Subject[RFC] [WIP] Unbork fs.h, 3 of 3
DateMon, 31 Dec 2001 06:36:08 +0100
This is the third patch of a series that will eventually remove the
filesystem-specific includes, the struct inode union and the struct 
super_block union from linux/fs.h.  See part 1 of this series for a 
description of the approach.

This patch changes the ext2 filesystem declaration, giving ext2 its own 
private inode cache.  The <ext2_fs_i> include is removed from linus/fs.h and 
moved to ext2_fs.h.  The ext2_inode_info member of the fs.h inode union is 
removed.  With the union out of the picture, ext2 inodes are somewhat 
smaller, 
so the practical effect of this is a small saving of cache memory.

If this approach meets with general approval, I will procede with the removal
of the ext2 member of the super_block union.

To apply this patch:

  cd /your/source/tree
  cat this/patch | patch -p0
I strongly recommended that this patch not be tested on a system containing
valuable data - user mode linux is the way to go.

--
Daniel

--- ../2.4.16.uml.clean/fs/ext2/super.c	Sun Dec 30 10:15:56 2001
+++ ./fs/ext2/super.c	Mon Dec 31 02:37:17 2001
@@ -798,7 +798,9 @@
 	return 0;
 }
 
-static DECLARE_FSTYPE_DEV(ext2_fs_type, "ext2", ext2_read_super);
+static FILESYSTEM(ext2_fs_type, "ext2", ext2_read_super,
+	sizeof (struct ext2_sb_info),
+	sizeof (struct ext2_inode_info));
 
 static int __init init_ext2_fs(void)
 {
--- ../2.4.16.uml.clean/include/linux/ext2_fs.h	Mon Dec 31 02:51:14 2001
+++ ./include/linux/ext2_fs.h	Mon Dec 31 02:38:25 2001
@@ -17,6 +17,7 @@
 #define _LINUX_EXT2_FS_H
 
 #include <linux/types.h>
+#include <linux/ext2_fs_i.h>
 
 /*
  * The second extended filesystem constants/structures
--- ../2.4.16.uml.clean/include/linux/fs.h	Mon Dec 31 02:51:14 2001
+++ ./include/linux/fs.h	Mon Dec 31 02:39:51 2001
@@ -288,7 +288,6 @@
 
 #include <linux/pipe_fs_i.h>
 #include <linux/minix_fs_i.h>
-#include <linux/ext2_fs_i.h>
 #include <linux/ext3_fs_i.h>
 #include <linux/hpfs_fs_i.h>
 #include <linux/ntfs_fs_i.h>
@@ -479,7 +478,6 @@
 	__u32			i_generation;
 	union {
 		struct minix_inode_info		minix_i;
-		struct ext2_inode_info		ext2_inode_info;
 		struct ext3_inode_info		ext3_i;
 		struct hpfs_inode_info		hpfs_i;
 		struct ntfs_inode_info		ntfs_i;
-
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/

\
 
 \ /
  Last update: 2005-03-22 12:14    [from the cache]
©2003-2008