Rev 422 | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
422 | giacomo | 1 | /* $Id: jffs2_fs_i.h,v 1.1 2004-01-28 15:25:48 giacomo Exp $ */ |
2 | |||
3 | #ifndef _JFFS2_FS_I |
||
4 | #define _JFFS2_FS_I |
||
5 | |||
6 | #include <linux/version.h> |
||
7 | #include <linux/rbtree.h> |
||
8 | |||
9 | struct jffs2_inode_info { |
||
10 | /* We need an internal semaphore similar to inode->i_sem. |
||
11 | Unfortunately, we can't used the existing one, because |
||
12 | either the GC would deadlock, or we'd have to release it |
||
13 | before letting GC proceed. Or we'd have to put ugliness |
||
14 | into the GC code so it didn't attempt to obtain the i_sem |
||
15 | for the inode(s) which are already locked */ |
||
16 | struct semaphore sem; |
||
17 | |||
18 | /* The highest (datanode) version number used for this ino */ |
||
19 | uint32_t highest_version; |
||
20 | |||
21 | /* List of data fragments which make up the file */ |
||
22 | struct rb_root fragtree; |
||
23 | |||
24 | /* There may be one datanode which isn't referenced by any of the |
||
25 | above fragments, if it contains a metadata update but no actual |
||
26 | data - or if this is a directory inode */ |
||
27 | /* This also holds the _only_ dnode for symlinks/device nodes, |
||
28 | etc. */ |
||
29 | struct jffs2_full_dnode *metadata; |
||
30 | |||
31 | /* Directory entries */ |
||
32 | struct jffs2_full_dirent *dents; |
||
33 | |||
34 | /* Some stuff we just have to keep in-core at all times, for each inode. */ |
||
35 | struct jffs2_inode_cache *inocache; |
||
36 | |||
37 | uint16_t flags; |
||
38 | uint8_t usercompr; |
||
39 | #if LINUX_VERSION_CODE > KERNEL_VERSION(2,5,2) |
||
40 | struct inode vfs_inode; |
||
41 | #endif |
||
42 | }; |
||
43 | |||
44 | #endif /* _JFFS2_FS_I */ |