aboutsummaryrefslogtreecommitdiffstats
path: root/fs/jffs2/nodelist.h
diff options
context:
space:
mode:
Diffstat (limited to 'fs/jffs2/nodelist.h')
-rw-r--r--fs/jffs2/nodelist.h21
1 files changed, 20 insertions, 1 deletions
diff --git a/fs/jffs2/nodelist.h b/fs/jffs2/nodelist.h
index f6645afe88e4..6f6279cf4909 100644
--- a/fs/jffs2/nodelist.h
+++ b/fs/jffs2/nodelist.h
@@ -20,6 +20,8 @@
20#include <linux/jffs2.h> 20#include <linux/jffs2.h>
21#include "jffs2_fs_sb.h" 21#include "jffs2_fs_sb.h"
22#include "jffs2_fs_i.h" 22#include "jffs2_fs_i.h"
23#include "xattr.h"
24#include "acl.h"
23#include "summary.h" 25#include "summary.h"
24 26
25#ifdef __ECOS 27#ifdef __ECOS
@@ -107,11 +109,16 @@ struct jffs2_inode_cache {
107 temporary lists of dirents, and later must be set to 109 temporary lists of dirents, and later must be set to
108 NULL to mark the end of the raw_node_ref->next_in_ino 110 NULL to mark the end of the raw_node_ref->next_in_ino
109 chain. */ 111 chain. */
112 u8 class; /* It's used for identification */
113 u8 flags;
114 uint16_t state;
110 struct jffs2_inode_cache *next; 115 struct jffs2_inode_cache *next;
111 struct jffs2_raw_node_ref *nodes; 116 struct jffs2_raw_node_ref *nodes;
112 uint32_t ino; 117 uint32_t ino;
113 int nlink; 118 int nlink;
114 int state; 119#ifdef CONFIG_JFFS2_FS_XATTR
120 struct list_head ilist;
121#endif
115}; 122};
116 123
117/* Inode states for 'state' above. We need the 'GC' state to prevent 124/* Inode states for 'state' above. We need the 'GC' state to prevent
@@ -125,6 +132,12 @@ struct jffs2_inode_cache {
125#define INO_STATE_READING 5 /* In read_inode() */ 132#define INO_STATE_READING 5 /* In read_inode() */
126#define INO_STATE_CLEARING 6 /* In clear_inode() */ 133#define INO_STATE_CLEARING 6 /* In clear_inode() */
127 134
135#define INO_FLAGS_XATTR_CHECKED 0x01 /* has no duplicate xattr_ref */
136
137#define RAWNODE_CLASS_INODE_CACHE 0
138#define RAWNODE_CLASS_XATTR_DATUM 1
139#define RAWNODE_CLASS_XATTR_REF 2
140
128#define INOCACHE_HASHSIZE 128 141#define INOCACHE_HASHSIZE 128
129 142
130/* 143/*
@@ -374,6 +387,12 @@ struct jffs2_node_frag *jffs2_alloc_node_frag(void);
374void jffs2_free_node_frag(struct jffs2_node_frag *); 387void jffs2_free_node_frag(struct jffs2_node_frag *);
375struct jffs2_inode_cache *jffs2_alloc_inode_cache(void); 388struct jffs2_inode_cache *jffs2_alloc_inode_cache(void);
376void jffs2_free_inode_cache(struct jffs2_inode_cache *); 389void jffs2_free_inode_cache(struct jffs2_inode_cache *);
390#ifdef CONFIG_JFFS2_FS_XATTR
391struct jffs2_xattr_datum *jffs2_alloc_xattr_datum(void);
392void jffs2_free_xattr_datum(struct jffs2_xattr_datum *);
393struct jffs2_xattr_ref *jffs2_alloc_xattr_ref(void);
394void jffs2_free_xattr_ref(struct jffs2_xattr_ref *);
395#endif
377 396
378/* gc.c */ 397/* gc.c */
379int jffs2_garbage_collect_pass(struct jffs2_sb_info *c); 398int jffs2_garbage_collect_pass(struct jffs2_sb_info *c);