Back to home page

OSCL-LXR

 
 

    


0001 /*
0002  * JFFS2 -- Journalling Flash File System, Version 2.
0003  *
0004  * Copyright © 2001-2007 Red Hat, Inc.
0005  * Copyright © 2004-2010 David Woodhouse <dwmw2@infradead.org>
0006  *
0007  * Created by David Woodhouse <dwmw2@infradead.org>
0008  *
0009  * For licensing information, see the file 'LICENCE' in this directory.
0010  *
0011  */
0012 
0013 #ifndef _JFFS2_FS_I
0014 #define _JFFS2_FS_I
0015 
0016 #include <linux/rbtree.h>
0017 #include <linux/posix_acl.h>
0018 #include <linux/mutex.h>
0019 
0020 struct jffs2_inode_info {
0021     /* We need an internal mutex similar to inode->i_rwsem.
0022        Unfortunately, we can't used the existing one, because
0023        either the GC would deadlock, or we'd have to release it
0024        before letting GC proceed. Or we'd have to put ugliness
0025        into the GC code so it didn't attempt to obtain the i_rwsem
0026        for the inode(s) which are already locked */
0027     struct mutex sem;
0028 
0029     /* The highest (datanode) version number used for this ino */
0030     uint32_t highest_version;
0031 
0032     /* List of data fragments which make up the file */
0033     struct rb_root fragtree;
0034 
0035     /* There may be one datanode which isn't referenced by any of the
0036        above fragments, if it contains a metadata update but no actual
0037        data - or if this is a directory inode */
0038     /* This also holds the _only_ dnode for symlinks/device nodes,
0039        etc. */
0040     struct jffs2_full_dnode *metadata;
0041 
0042     /* Directory entries */
0043     struct jffs2_full_dirent *dents;
0044 
0045     /* The target path if this is the inode of a symlink */
0046     unsigned char *target;
0047 
0048     /* Some stuff we just have to keep in-core at all times, for each inode. */
0049     struct jffs2_inode_cache *inocache;
0050 
0051     uint16_t flags;
0052     uint8_t usercompr;
0053     struct inode vfs_inode;
0054 };
0055 
0056 #endif /* _JFFS2_FS_I */