Thomas Gleixner | 182ec4e | 2005-11-07 11:16:07 +0000 | [diff] [blame] | 1 | /* $Id: jffs2_fs_i.h,v 1.19 2005/11/07 11:14:52 gleixner Exp $ */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 2 | |
| 3 | #ifndef _JFFS2_FS_I |
| 4 | #define _JFFS2_FS_I |
| 5 | |
| 6 | #include <linux/version.h> |
| 7 | #include <linux/rbtree.h> |
KaiGai Kohei | aa98d7c | 2006-05-13 15:09:47 +0900 | [diff] [blame^] | 8 | #include <linux/posix_acl.h> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 9 | #include <asm/semaphore.h> |
| 10 | |
| 11 | struct jffs2_inode_info { |
Jes Sorensen | 1b1dcc1 | 2006-01-09 15:59:24 -0800 | [diff] [blame] | 12 | /* We need an internal mutex similar to inode->i_mutex. |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 13 | Unfortunately, we can't used the existing one, because |
| 14 | either the GC would deadlock, or we'd have to release it |
| 15 | before letting GC proceed. Or we'd have to put ugliness |
Jes Sorensen | 1b1dcc1 | 2006-01-09 15:59:24 -0800 | [diff] [blame] | 16 | into the GC code so it didn't attempt to obtain the i_mutex |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 17 | for the inode(s) which are already locked */ |
| 18 | struct semaphore sem; |
| 19 | |
| 20 | /* The highest (datanode) version number used for this ino */ |
| 21 | uint32_t highest_version; |
| 22 | |
| 23 | /* List of data fragments which make up the file */ |
| 24 | struct rb_root fragtree; |
| 25 | |
| 26 | /* There may be one datanode which isn't referenced by any of the |
| 27 | above fragments, if it contains a metadata update but no actual |
| 28 | data - or if this is a directory inode */ |
Thomas Gleixner | 182ec4e | 2005-11-07 11:16:07 +0000 | [diff] [blame] | 29 | /* This also holds the _only_ dnode for symlinks/device nodes, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 30 | etc. */ |
| 31 | struct jffs2_full_dnode *metadata; |
| 32 | |
| 33 | /* Directory entries */ |
| 34 | struct jffs2_full_dirent *dents; |
| 35 | |
Artem B. Bityutskiy | 2b79adc | 2005-07-17 12:13:51 +0100 | [diff] [blame] | 36 | /* The target path if this is the inode of a symlink */ |
| 37 | unsigned char *target; |
| 38 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 39 | /* Some stuff we just have to keep in-core at all times, for each inode. */ |
| 40 | struct jffs2_inode_cache *inocache; |
| 41 | |
| 42 | uint16_t flags; |
| 43 | uint8_t usercompr; |
| 44 | #if !defined (__ECOS) |
| 45 | #if LINUX_VERSION_CODE > KERNEL_VERSION(2,5,2) |
| 46 | struct inode vfs_inode; |
| 47 | #endif |
| 48 | #endif |
KaiGai Kohei | aa98d7c | 2006-05-13 15:09:47 +0900 | [diff] [blame^] | 49 | #ifdef CONFIG_JFFS2_FS_POSIX_ACL |
| 50 | struct posix_acl *i_acl_access; |
| 51 | struct posix_acl *i_acl_default; |
| 52 | #endif |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 53 | }; |
| 54 | |
| 55 | #endif /* _JFFS2_FS_I */ |