| 
									
										
										
										
											2007-04-25 14:16:47 +01:00
										 |  |  | /*
 | 
					
						
							|  |  |  |  * JFFS2 -- Journalling Flash File System, Version 2. | 
					
						
							|  |  |  |  * | 
					
						
							|  |  |  |  * Copyright © 2001-2007 Red Hat, Inc. | 
					
						
							| 
									
										
										
										
											2010-08-08 14:15:22 +01:00
										 |  |  |  * Copyright © 2004-2010 David Woodhouse <dwmw2@infradead.org> | 
					
						
							| 
									
										
										
										
											2007-04-25 14:16:47 +01:00
										 |  |  |  * | 
					
						
							|  |  |  |  * Created by David Woodhouse <dwmw2@infradead.org> | 
					
						
							|  |  |  |  * | 
					
						
							|  |  |  |  * For licensing information, see the file 'LICENCE' in this directory. | 
					
						
							|  |  |  |  * | 
					
						
							|  |  |  |  */ | 
					
						
							| 
									
										
										
										
											2005-04-16 15:20:36 -07:00
										 |  |  | 
 | 
					
						
							|  |  |  | #ifndef _JFFS2_FS_I
 | 
					
						
							|  |  |  | #define _JFFS2_FS_I
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #include <linux/rbtree.h>
 | 
					
						
							| 
									
										
										
										
											2006-05-13 15:09:47 +09:00
										 |  |  | #include <linux/posix_acl.h>
 | 
					
						
							| 
									
										
										
										
											2008-04-22 23:53:26 +01:00
										 |  |  | #include <linux/mutex.h>
 | 
					
						
							| 
									
										
										
										
											2005-04-16 15:20:36 -07:00
										 |  |  | 
 | 
					
						
							|  |  |  | struct jffs2_inode_info { | 
					
						
							| 
									
										
										
										
											2006-01-09 15:59:24 -08:00
										 |  |  | 	/* We need an internal mutex similar to inode->i_mutex.
 | 
					
						
							| 
									
										
										
										
											2005-04-16 15:20:36 -07:00
										 |  |  | 	   Unfortunately, we can't used the existing one, because | 
					
						
							|  |  |  | 	   either the GC would deadlock, or we'd have to release it | 
					
						
							|  |  |  | 	   before letting GC proceed. Or we'd have to put ugliness | 
					
						
							| 
									
										
										
										
											2006-01-09 15:59:24 -08:00
										 |  |  | 	   into the GC code so it didn't attempt to obtain the i_mutex | 
					
						
							| 
									
										
										
										
											2005-04-16 15:20:36 -07:00
										 |  |  | 	   for the inode(s) which are already locked */ | 
					
						
							| 
									
										
										
										
											2008-04-22 15:13:40 +01:00
										 |  |  | 	struct mutex sem; | 
					
						
							| 
									
										
										
										
											2005-04-16 15:20:36 -07:00
										 |  |  | 
 | 
					
						
							|  |  |  | 	/* The highest (datanode) version number used for this ino */ | 
					
						
							|  |  |  | 	uint32_t highest_version; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	/* List of data fragments which make up the file */ | 
					
						
							|  |  |  | 	struct rb_root fragtree; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	/* There may be one datanode which isn't referenced by any of the
 | 
					
						
							|  |  |  | 	   above fragments, if it contains a metadata update but no actual | 
					
						
							|  |  |  | 	   data - or if this is a directory inode */ | 
					
						
							| 
									
										
										
										
											2005-11-07 11:16:07 +00:00
										 |  |  | 	/* This also holds the _only_ dnode for symlinks/device nodes,
 | 
					
						
							| 
									
										
										
										
											2005-04-16 15:20:36 -07:00
										 |  |  | 	   etc. */ | 
					
						
							|  |  |  | 	struct jffs2_full_dnode *metadata; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	/* Directory entries */ | 
					
						
							|  |  |  | 	struct jffs2_full_dirent *dents; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2005-07-17 12:13:51 +01:00
										 |  |  | 	/* The target path if this is the inode of a symlink */ | 
					
						
							|  |  |  | 	unsigned char *target; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2005-04-16 15:20:36 -07:00
										 |  |  | 	/* Some stuff we just have to keep in-core at all times, for each inode. */ | 
					
						
							|  |  |  | 	struct jffs2_inode_cache *inocache; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	uint16_t flags; | 
					
						
							|  |  |  | 	uint8_t usercompr; | 
					
						
							|  |  |  | 	struct inode vfs_inode; | 
					
						
							|  |  |  | }; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #endif /* _JFFS2_FS_I */
 |