mtd/fs/jffs2/ecos/src fs-ecos.c,1.19,1.20 jffs2port.h,1.8,1.9 os-ecos.h,1.12,1.13

David Woodhouse dwmw2 at infradead.org
Wed Nov 26 08:08:11 EST 2003


Update of /home/cvs/mtd/fs/jffs2/ecos/src
In directory phoenix.infradead.org:/tmp/cvs-serv5278

Modified Files:
	fs-ecos.c jffs2port.h os-ecos.h 
Log Message:
Cruftectomy part 1

Index: fs-ecos.c
===================================================================
RCS file: /home/cvs/mtd/fs/jffs2/ecos/src/fs-ecos.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- fs-ecos.c	25 Nov 2003 17:10:06 -0000	1.19
+++ fs-ecos.c	26 Nov 2003 13:08:08 -0000	1.20
@@ -482,9 +482,9 @@
 		goto out_nodes;
 	}
 
-	sb->s_blocksize = PAGE_CACHE_SIZE;
-	sb->s_blocksize_bits = PAGE_CACHE_SHIFT;
-	sb->s_magic = JFFS2_SUPER_MAGIC;
+	//	sb->s_blocksize = PAGE_CACHE_SIZE;
+	//	sb->s_blocksize_bits = PAGE_CACHE_SHIFT;
+	//	sb->s_magic = JFFS2_SUPER_MAGIC;
 
 	return 0;
 

Index: jffs2port.h
===================================================================
RCS file: /home/cvs/mtd/fs/jffs2/ecos/src/jffs2port.h,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- jffs2port.h	25 Nov 2003 11:25:48 -0000	1.8
+++ jffs2port.h	26 Nov 2003 13:08:08 -0000	1.9
@@ -5,9 +5,7 @@
 
 #include <pkgconf/system.h>
 #include <pkgconf/hal.h>
-//#include <pkgconf/kernel.h>
 #include <pkgconf/io_fileio.h>
-//#include <pkgconf/fs_ram.h>
 
 #include <cyg/infra/cyg_trac.h>        // tracing macros
 #include <cyg/infra/cyg_ass.h>         // assertion macros
@@ -33,6 +31,7 @@
 #include <linux/types.h>
 #include <linux/list.h>
 #include <asm/bug.h>
+
 // Linux types
 #define printf diag_printf
 
@@ -48,22 +47,11 @@
 
 #define DNAME_INLINE_LEN 16
 
-struct dentry {
-	//	atomic_t d_count;
-	unsigned int d_flags;
-	struct _inode  * d_inode;	/* Where the name belongs to - NULL is negative */
-	struct dentry * d_parent;	/* parent directory */
-	struct list_head d_hash;	/* lookup hash list */
-	struct list_head d_child;	/* child of parent list */
-	struct list_head d_subdirs;	/* our children */
-	struct list_head d_alias;	/* inode alias list */
-	struct qstr d_name;
-	struct dentry_operations  *d_op;
-	struct super_block * d_sb;	/* The root of the dentry tree */
-	unsigned char d_iname[DNAME_INLINE_LEN]; /* small names */
-};
+struct _inode;
+struct super_block;
+struct ffile;
 
-struct file {
+struct ddfile {
 	struct dentry		*f_dentry;
 	unsigned int 		f_flags;
 	mode_t			    f_mode;
@@ -99,52 +87,6 @@
 struct page {
 	unsigned long index;
 	void *virtual;
-};
-
-struct nameidata {
-	struct dentry *dentry;
-	struct qstr last;
-	unsigned int flags;
-	int last_type;
-};
-
-struct file_operations {
-	//struct module *owner;
-	//loff_t (*llseek) (struct file *, loff_t, int);
-	ssize_t (*read) (struct file *, char *, size_t, loff_t *);
-	//ssize_t (*write) (struct file *, const char *, size_t, loff_t *);
-	int (*readdir) (struct file *, char *, int);
-	//unsigned int (*poll) (struct file *, struct poll_table_struct *);
-	int (*ioctl) (struct _inode *, struct file *, unsigned int, unsigned long);
-	//int (*mmap) (struct file *, struct vm_area_struct *);
-	//int (*open) (struct _inode *, struct file *);
-	//int (*flush) (struct file *);
-	//int (*release) (struct _inode *, struct file *);
-	int (*fsync) (struct file *, struct dentry *, int datasync);
-	//int (*fasync) (int, struct file *, int);
-	//int (*lock) (struct file *, int, struct file_lock *);
-	//ssize_t (*readv) (struct file *, const struct iovec *, unsigned long, loff_t *);
-	//ssize_t (*writev) (struct file *, const struct iovec *, unsigned long, loff_t *);
-};
-
-struct _inode_operations {
-	int (*create) (struct _inode *,struct dentry *,int);
-	struct dentry * (*lookup) (struct _inode *,struct dentry *);
-	int (*link) (struct dentry *,struct _inode *,struct dentry *);
-	int (*unlink) (struct _inode *,struct dentry *);
-	int (*symlink) (struct _inode *,struct dentry *,const char *);
-	int (*mkdir) (struct _inode *,struct dentry *,int);
-	int (*rmdir) (struct _inode *,struct dentry *);
-	int (*mknod) (struct _inode *,struct dentry *,int,int);
-	int (*rename) (struct _inode *, struct dentry *,
-			struct _inode *, struct dentry *);
-	int (*readlink) (struct dentry *, char *,int);
-	int (*follow_link) (struct dentry *, struct nameidata *);
-	//void (*truncate) (struct _inode *);
-	int (*permission) (struct _inode *, int);
-	//int (*revalidate) (struct dentry *);
-	int (*setattr) (struct dentry *, struct iattr *);
-	//int (*getattr) (struct dentry *, struct iattr *);
 };
 
 

Index: os-ecos.h
===================================================================
RCS file: /home/cvs/mtd/fs/jffs2/ecos/src/os-ecos.h,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- os-ecos.h	26 Nov 2003 13:02:47 -0000	1.12
+++ os-ecos.h	26 Nov 2003 13:08:08 -0000	1.13
@@ -134,15 +134,11 @@
 #define JFFS2_F_I_RDEV_MIN(f) (MINOR(to_kdev_t(OFNI_EDONI_2SFFJ(f)->i_rdev)))
 #define JFFS2_F_I_RDEV_MAJ(f) (MAJOR(to_kdev_t(OFNI_EDONI_2SFFJ(f)->i_rdev)))
 
-
 //#define ITIME(sec) (sec)
 //#define I_SEC(x) (x)
 #define get_seconds cyg_timestamp
 
 struct _inode {
-	//struct list_head	i_hash;
-	//struct list_head	i_list;
-	struct list_head	i_dentry;
 
 	cyg_uint32		i_ino;
 	atomic_t		i_count;
@@ -156,30 +152,10 @@
 	time_t			i_atime;
 	time_t			i_mtime;
 	time_t			i_ctime;
-	unsigned long		i_blksize;
-	unsigned long		i_blocks;
-	//unsigned long		i_version;
-	//struct semaphore	i_sem;
-	//struct semaphore	i_zombie;
-	struct _inode_operations	*i_op;
-	struct file_operations	*i_fop;	// former ->i_op->default_file_ops 
 	struct super_block	*i_sb;
-	//wait_queue_head_t	i_wait;
-	//struct file_lock	*i_flock;
-	//struct address_space	*i_mapping;
-	//struct address_space	i_data;	
-	//struct dquot		*i_dquot[MAXQUOTAS];
-	//struct pipe_inode_info	*i_pipe;
-	//struct block_device	*i_bdev;
-
-	//unsigned long		i_state;
-
-	unsigned int		i_flags;
-	//unsigned char		i_sock;
-
-	atomic_t		i_writecount;
-	//unsigned int		i_attr_flags;
-	//uint32_t			i_generation;
+	//	unsigned int		i_flags;
+	//	atomic_t		i_writecount;
+
 	struct jffs2_inode_info	jffs2_i;
 
         struct _inode *i_parent;
@@ -189,21 +165,13 @@
 };
 
 #define JFFS2_SB_INFO(sb) (&(sb)->jffs2_sb)
-
 #define OFNI_BS_2SFFJ(c)  ((struct super_block *) ( ((char *)c) - ((char *)(&((struct super_block *)NULL)->jffs2_sb)) ) )
 
 struct super_block {
-	unsigned long		s_blocksize;
-	unsigned char		s_blocksize_bits;
-	unsigned char		s_dirt;
-	//struct super_operations	*s_op;
-	unsigned long		s_flags;
-	unsigned long		s_magic;
-	//struct dentry		*s_root;
-	struct _inode		*s_root;
 	struct jffs2_sb_info jffs2_sb;
-        unsigned long       s_mount_count;
-    cyg_io_handle_t     s_dev;
+	struct _inode *s_root;
+        unsigned long s_mount_count;
+	cyg_io_handle_t s_dev;
 };
 
 #define sleep_on_spinunlock(wq, sl) do { ; } while(0)
@@ -214,25 +182,6 @@
 {
 	/* We don't have a GC thread in eCos (yet) */
 }
-
-/* dir.c */
-extern struct file_operations jffs2_dir_operations;
-extern struct _inode_operations jffs2_dir_inode_operations;
-
-/* file.c */
-extern struct file_operations jffs2_file_operations;
-extern struct _inode_operations jffs2_file_inode_operations;
-extern struct address_space_operations jffs2_file_address_operations;
-int jffs2_null_fsync(struct file *, struct dentry *, int);
-int jffs2_setattr (struct dentry *dentry, struct iattr *iattr);
-int jffs2_do_readpage_nolock (struct _inode *inode, struct page *pg);
-int jffs2_do_readpage_unlock (struct _inode *inode, struct page *pg);
-//int jffs2_readpage (struct file *, struct page *);
-int jffs2_readpage (struct _inode *d_inode, struct page *pg);
-//int jffs2_prepare_write (struct file *, struct page *, unsigned, unsigned);
-int jffs2_prepare_write (struct _inode *d_inode, struct page *pg, unsigned start, unsigned end);
-//int jffs2_commit_write (struct file *, struct page *, unsigned, unsigned);
-int jffs2_commit_write (struct _inode *d_inode, struct page *pg, unsigned start, unsigned end);
 
 /* fs.c */
 void jffs2_gc_release_inode(struct jffs2_sb_info *c,




More information about the linux-mtd-cvs mailing list