diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2005-07-11 13:18:18 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-07-11 13:18:18 -0400 |
commit | 200d481f28be4522464bb849dd0eb5f8cb6be781 (patch) | |
tree | 8cd00ead1b202dfd377cf34000a5193959aa2e8b /fs/jffs2/nodelist.h | |
parent | f43a64c5e1a65d12b9b53a35ed2d5db441fcb64c (diff) | |
parent | 97f927a4d7dbccde0a854a62c3ea54d90bae8679 (diff) |
Merge master.kernel.org:/pub/scm/linux/kernel/git/tglx/mtd-2.6
Diffstat (limited to 'fs/jffs2/nodelist.h')
-rw-r--r-- | fs/jffs2/nodelist.h | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/fs/jffs2/nodelist.h b/fs/jffs2/nodelist.h index a4864d05ea92..b34c397909ef 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.126 2004/11/19 15:06:29 dedekind Exp $ | 10 | * $Id: nodelist.h,v 1.131 2005/07/05 21:03:07 dwmw2 Exp $ |
11 | * | 11 | * |
12 | */ | 12 | */ |
13 | 13 | ||
@@ -135,6 +135,7 @@ struct jffs2_inode_cache { | |||
135 | #define INO_STATE_CHECKEDABSENT 3 /* Checked, cleared again */ | 135 | #define INO_STATE_CHECKEDABSENT 3 /* Checked, cleared again */ |
136 | #define INO_STATE_GC 4 /* GCing a 'pristine' node */ | 136 | #define INO_STATE_GC 4 /* GCing a 'pristine' node */ |
137 | #define INO_STATE_READING 5 /* In read_inode() */ | 137 | #define INO_STATE_READING 5 /* In read_inode() */ |
138 | #define INO_STATE_CLEARING 6 /* In clear_inode() */ | ||
138 | 139 | ||
139 | #define INOCACHE_HASHSIZE 128 | 140 | #define INOCACHE_HASHSIZE 128 |
140 | 141 | ||
@@ -160,7 +161,7 @@ struct jffs2_full_dnode | |||
160 | */ | 161 | */ |
161 | struct jffs2_tmp_dnode_info | 162 | struct jffs2_tmp_dnode_info |
162 | { | 163 | { |
163 | struct jffs2_tmp_dnode_info *next; | 164 | struct rb_node rb; |
164 | struct jffs2_full_dnode *fn; | 165 | struct jffs2_full_dnode *fn; |
165 | uint32_t version; | 166 | uint32_t version; |
166 | }; | 167 | }; |
@@ -362,6 +363,18 @@ static inline struct jffs2_node_frag *frag_first(struct rb_root *root) | |||
362 | node = node->rb_left; | 363 | node = node->rb_left; |
363 | return rb_entry(node, struct jffs2_node_frag, rb); | 364 | return rb_entry(node, struct jffs2_node_frag, rb); |
364 | } | 365 | } |
366 | |||
367 | static inline struct jffs2_node_frag *frag_last(struct rb_root *root) | ||
368 | { | ||
369 | struct rb_node *node = root->rb_node; | ||
370 | |||
371 | if (!node) | ||
372 | return NULL; | ||
373 | while(node->rb_right) | ||
374 | node = node->rb_right; | ||
375 | return rb_entry(node, struct jffs2_node_frag, rb); | ||
376 | } | ||
377 | |||
365 | #define rb_parent(rb) ((rb)->rb_parent) | 378 | #define rb_parent(rb) ((rb)->rb_parent) |
366 | #define frag_next(frag) rb_entry(rb_next(&(frag)->rb), struct jffs2_node_frag, rb) | 379 | #define frag_next(frag) rb_entry(rb_next(&(frag)->rb), struct jffs2_node_frag, rb) |
367 | #define frag_prev(frag) rb_entry(rb_prev(&(frag)->rb), struct jffs2_node_frag, rb) | 380 | #define frag_prev(frag) rb_entry(rb_prev(&(frag)->rb), struct jffs2_node_frag, rb) |
@@ -374,7 +387,7 @@ static inline struct jffs2_node_frag *frag_first(struct rb_root *root) | |||
374 | D2(void jffs2_print_frag_list(struct jffs2_inode_info *f)); | 387 | D2(void jffs2_print_frag_list(struct jffs2_inode_info *f)); |
375 | void jffs2_add_fd_to_list(struct jffs2_sb_info *c, struct jffs2_full_dirent *new, struct jffs2_full_dirent **list); | 388 | void jffs2_add_fd_to_list(struct jffs2_sb_info *c, struct jffs2_full_dirent *new, struct jffs2_full_dirent **list); |
376 | int jffs2_get_inode_nodes(struct jffs2_sb_info *c, struct jffs2_inode_info *f, | 389 | int jffs2_get_inode_nodes(struct jffs2_sb_info *c, struct jffs2_inode_info *f, |
377 | struct jffs2_tmp_dnode_info **tnp, struct jffs2_full_dirent **fdp, | 390 | struct rb_root *tnp, struct jffs2_full_dirent **fdp, |
378 | uint32_t *highest_version, uint32_t *latest_mctime, | 391 | uint32_t *highest_version, uint32_t *latest_mctime, |
379 | uint32_t *mctime_ver); | 392 | uint32_t *mctime_ver); |
380 | void jffs2_set_inocache_state(struct jffs2_sb_info *c, struct jffs2_inode_cache *ic, int state); | 393 | void jffs2_set_inocache_state(struct jffs2_sb_info *c, struct jffs2_inode_cache *ic, int state); |
@@ -462,7 +475,7 @@ int jffs2_do_mount_fs(struct jffs2_sb_info *c); | |||
462 | /* erase.c */ | 475 | /* erase.c */ |
463 | void jffs2_erase_pending_blocks(struct jffs2_sb_info *c, int count); | 476 | void jffs2_erase_pending_blocks(struct jffs2_sb_info *c, int count); |
464 | 477 | ||
465 | #ifdef CONFIG_JFFS2_FS_NAND | 478 | #ifdef CONFIG_JFFS2_FS_WRITEBUFFER |
466 | /* wbuf.c */ | 479 | /* wbuf.c */ |
467 | int jffs2_flush_wbuf_gc(struct jffs2_sb_info *c, uint32_t ino); | 480 | int jffs2_flush_wbuf_gc(struct jffs2_sb_info *c, uint32_t ino); |
468 | int jffs2_flush_wbuf_pad(struct jffs2_sb_info *c); | 481 | int jffs2_flush_wbuf_pad(struct jffs2_sb_info *c); |