Blame view

fs/jffs2/jffs2_fs_i.h 1.59 KB
c00c310ea   David Woodhouse   [JFFS2] Tidy up l...
1
2
3
4
  /*
   * JFFS2 -- Journalling Flash File System, Version 2.
   *
   * Copyright © 2001-2007 Red Hat, Inc.
6088c0587   David Woodhouse   jffs2: Update cop...
5
   * Copyright © 2004-2010 David Woodhouse <dwmw2@infradead.org>
c00c310ea   David Woodhouse   [JFFS2] Tidy up l...
6
7
8
9
10
11
   *
   * Created by David Woodhouse <dwmw2@infradead.org>
   *
   * For licensing information, see the file 'LICENCE' in this directory.
   *
   */
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
12
13
14
  
  #ifndef _JFFS2_FS_I
  #define _JFFS2_FS_I
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
15
  #include <linux/rbtree.h>
aa98d7cf5   KaiGai Kohei   [JFFS2][XATTR] XA...
16
  #include <linux/posix_acl.h>
cf9d1e428   David Woodhouse   [JFFS2] Self-suff...
17
  #include <linux/mutex.h>
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
18
19
  
  struct jffs2_inode_info {
1b1dcc1b5   Jes Sorensen   [PATCH] mutex sub...
20
  	/* We need an internal mutex similar to inode->i_mutex.
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
21
22
23
  	   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
1b1dcc1b5   Jes Sorensen   [PATCH] mutex sub...
24
  	   into the GC code so it didn't attempt to obtain the i_mutex
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
25
  	   for the inode(s) which are already locked */
ced220703   David Woodhouse   [JFFS2] semaphore...
26
  	struct mutex sem;
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
27
28
29
30
31
32
33
34
35
36
  
  	/* 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 */
182ec4eee   Thomas Gleixner   [JFFS2] Clean up ...
37
  	/* This also holds the _only_ dnode for symlinks/device nodes,
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
38
39
40
41
42
  	   etc. */
  	struct jffs2_full_dnode *metadata;
  
  	/* Directory entries */
  	struct jffs2_full_dirent *dents;
2b79adcca   Artem B. Bityutskiy   [JFFS2] Use f->ta...
43
44
  	/* The target path if this is the inode of a symlink */
  	unsigned char *target;
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
45
46
47
48
49
  	/* 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;
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
50
  	struct inode vfs_inode;
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
51
52
53
  };
  
  #endif /* _JFFS2_FS_I */