diff options
author | Artem B. Bityutskiy <dedekind@infradead.org> | 2005-08-01 08:05:22 -0400 |
---|---|---|
committer | Thomas Gleixner <tglx@mtd.linutronix.de> | 2005-11-06 12:22:17 -0500 |
commit | 1e0da3cb6cd4a909c64c870344183185bd6815b1 (patch) | |
tree | f7ffedba74681cd8f7662990dfb4f3919dcaef23 /fs/jffs2/nodelist.h | |
parent | e0e3006f79a6d995c9a7de7556f11a9b97536423 (diff) |
[JFFS2] Build fragtree in reverse order
Instead of building fragtree starting from node with the smallest version
number, start from the highest. This helps to avoid reading and checking
obsolete nodes.
Signed-off-by: Artem B. Bityutskiy <dedekind@infradead.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'fs/jffs2/nodelist.h')
-rw-r--r-- | fs/jffs2/nodelist.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/fs/jffs2/nodelist.h b/fs/jffs2/nodelist.h index 53c12e4a337d..adee3c6eb448 100644 --- a/fs/jffs2/nodelist.h +++ b/fs/jffs2/nodelist.h | |||
@@ -7,7 +7,7 @@ | |||
7 | * | 7 | * |
8 | * For licensing information, see the file 'LICENCE' in this directory. | 8 | * For licensing information, see the file 'LICENCE' in this directory. |
9 | * | 9 | * |
10 | * $Id: nodelist.h,v 1.136 2005/07/31 08:20:44 dedekind Exp $ | 10 | * $Id: nodelist.h,v 1.137 2005/08/01 12:05:19 dedekind Exp $ |
11 | * | 11 | * |
12 | */ | 12 | */ |
13 | 13 | ||
@@ -61,6 +61,9 @@ | |||
61 | #error wibble | 61 | #error wibble |
62 | #endif | 62 | #endif |
63 | 63 | ||
64 | /* The minimal node header size */ | ||
65 | #define JFFS2_MIN_NODE_HEADER sizeof(struct jffs2_raw_dirent) | ||
66 | |||
64 | /* | 67 | /* |
65 | This is all we need to keep in-core for each raw node during normal | 68 | This is all we need to keep in-core for each raw node during normal |
66 | operation. As and when we do read_inode on a particular inode, we can | 69 | operation. As and when we do read_inode on a particular inode, we can |
@@ -148,6 +151,9 @@ struct jffs2_tmp_dnode_info | |||
148 | struct rb_node rb; | 151 | struct rb_node rb; |
149 | struct jffs2_full_dnode *fn; | 152 | struct jffs2_full_dnode *fn; |
150 | uint32_t version; | 153 | uint32_t version; |
154 | uint32_t data_crc; | ||
155 | uint32_t partial_crc; | ||
156 | uint32_t csize; | ||
151 | }; | 157 | }; |
152 | 158 | ||
153 | struct jffs2_full_dirent | 159 | struct jffs2_full_dirent |
@@ -311,6 +317,7 @@ void rb_replace_node(struct rb_node *victim, struct rb_node *new, struct rb_root | |||
311 | void jffs2_obsolete_node_frag(struct jffs2_sb_info *c, struct jffs2_node_frag *this); | 317 | void jffs2_obsolete_node_frag(struct jffs2_sb_info *c, struct jffs2_node_frag *this); |
312 | int jffs2_add_full_dnode_to_inode(struct jffs2_sb_info *c, struct jffs2_inode_info *f, struct jffs2_full_dnode *fn); | 318 | int jffs2_add_full_dnode_to_inode(struct jffs2_sb_info *c, struct jffs2_inode_info *f, struct jffs2_full_dnode *fn); |
313 | void jffs2_truncate_fragtree (struct jffs2_sb_info *c, struct rb_root *list, uint32_t size); | 319 | void jffs2_truncate_fragtree (struct jffs2_sb_info *c, struct rb_root *list, uint32_t size); |
320 | int jffs2_add_older_frag_to_fragtree(struct jffs2_sb_info *c, struct jffs2_inode_info *f, struct jffs2_tmp_dnode_info *tn); | ||
314 | 321 | ||
315 | /* nodemgmt.c */ | 322 | /* nodemgmt.c */ |
316 | int jffs2_thread_should_wake(struct jffs2_sb_info *c); | 323 | int jffs2_thread_should_wake(struct jffs2_sb_info *c); |