Home
last modified time | relevance | path

Searched refs:jeb (Results 1 – 16 of 16) sorted by relevance

/fs/jffs2/
Ddebug.c29 struct jffs2_eraseblock *jeb) in __jffs2_dbg_acct_sanity_check_nolock() argument
31 if (unlikely(jeb && jeb->used_size + jeb->dirty_size + in __jffs2_dbg_acct_sanity_check_nolock()
32 jeb->free_size + jeb->wasted_size + in __jffs2_dbg_acct_sanity_check_nolock()
33 jeb->unchecked_size != c->sector_size)) { in __jffs2_dbg_acct_sanity_check_nolock()
34 JFFS2_ERROR("eeep, space accounting for block at 0x%08x is screwed.\n", jeb->offset); in __jffs2_dbg_acct_sanity_check_nolock()
36 jeb->free_size, jeb->dirty_size, jeb->used_size, in __jffs2_dbg_acct_sanity_check_nolock()
37 jeb->wasted_size, jeb->unchecked_size, c->sector_size); in __jffs2_dbg_acct_sanity_check_nolock()
53 struct jffs2_eraseblock *jeb) in __jffs2_dbg_acct_sanity_check() argument
56 jffs2_dbg_acct_sanity_check_nolock(c, jeb); in __jffs2_dbg_acct_sanity_check()
162 struct jffs2_eraseblock *jeb; in __jffs2_dbg_superblock_counts() local
[all …]
Dnodemgmt.c237 static void jffs2_close_nextblock(struct jffs2_sb_info *c, struct jffs2_eraseblock *jeb) in jffs2_close_nextblock() argument
242 __func__, jeb->offset); in jffs2_close_nextblock()
246 if (ISDIRTY (jeb->wasted_size + jeb->dirty_size)) { in jffs2_close_nextblock()
247 c->dirty_size += jeb->wasted_size; in jffs2_close_nextblock()
248 c->wasted_size -= jeb->wasted_size; in jffs2_close_nextblock()
249 jeb->dirty_size += jeb->wasted_size; in jffs2_close_nextblock()
250 jeb->wasted_size = 0; in jffs2_close_nextblock()
251 if (VERYDIRTY(c, jeb->dirty_size)) { in jffs2_close_nextblock()
253 jeb->offset, jeb->free_size, jeb->dirty_size, in jffs2_close_nextblock()
254 jeb->used_size); in jffs2_close_nextblock()
[all …]
Derase.c25 struct jffs2_eraseblock *jeb; member
32 static void jffs2_erase_failed(struct jffs2_sb_info *c, struct jffs2_eraseblock *jeb, uint32_t bad_…
33 static void jffs2_erase_succeeded(struct jffs2_sb_info *c, struct jffs2_eraseblock *jeb);
34 static void jffs2_mark_erased_block(struct jffs2_sb_info *c, struct jffs2_eraseblock *jeb);
37 struct jffs2_eraseblock *jeb) in jffs2_erase_block() argument
42 ret = jffs2_flash_erase(c, jeb); in jffs2_erase_block()
44 jffs2_erase_succeeded(c, jeb); in jffs2_erase_block()
47 bad_offset = jeb->offset; in jffs2_erase_block()
53 jeb->offset, jeb->offset, jeb->offset + c->sector_size); in jffs2_erase_block()
59 list_move(&jeb->list, &c->erase_pending_list); in jffs2_erase_block()
[all …]
Dscan.c39 static int jffs2_scan_eraseblock (struct jffs2_sb_info *c, struct jffs2_eraseblock *jeb,
46 static int jffs2_scan_inode_node(struct jffs2_sb_info *c, struct jffs2_eraseblock *jeb,
48 static int jffs2_scan_dirent_node(struct jffs2_sb_info *c, struct jffs2_eraseblock *jeb,
69 static int file_dirty(struct jffs2_sb_info *c, struct jffs2_eraseblock *jeb) in file_dirty() argument
73 if ((ret = jffs2_prealloc_raw_node_refs(c, jeb, 1))) in file_dirty()
75 if ((ret = jffs2_scan_dirty_space(c, jeb, jeb->free_size))) in file_dirty()
79 jeb->dirty_size += jeb->wasted_size; in file_dirty()
80 c->dirty_size += jeb->wasted_size; in file_dirty()
81 c->wasted_size -= jeb->wasted_size; in file_dirty()
82 jeb->wasted_size = 0; in file_dirty()
[all …]
Ddebug.h174 struct jffs2_eraseblock *jeb);
177 struct jffs2_eraseblock *jeb);
186 struct jffs2_eraseblock *jeb);
189 struct jffs2_eraseblock *jeb);
196 __jffs2_dbg_dump_jeb(struct jffs2_sb_info *c, struct jffs2_eraseblock *jeb);
198 __jffs2_dbg_dump_jeb_nolock(struct jffs2_eraseblock *jeb);
205 struct jffs2_eraseblock *jeb);
208 struct jffs2_eraseblock *jeb);
223 #define jffs2_dbg_acct_paranoia_check(c, jeb) \ argument
224 __jffs2_dbg_acct_paranoia_check(c,jeb)
[all …]
Dsummary.c252 struct jffs2_eraseblock *jeb; in jffs2_sum_add_kvec() local
260 jeb = &c->blocks[ofs / c->sector_size]; in jffs2_sum_add_kvec()
261 ofs -= jeb->offset; in jffs2_sum_add_kvec()
371 struct jffs2_eraseblock *jeb, in sum_link_node_ref() argument
376 if ((ofs & ~3) > c->sector_size - jeb->free_size) { in sum_link_node_ref()
378 jffs2_scan_dirty_space(c, jeb, (ofs & ~3) - (c->sector_size - jeb->free_size)); in sum_link_node_ref()
381 return jffs2_link_node_ref(c, jeb, jeb->offset + ofs, len, ic); in sum_link_node_ref()
386 static int jffs2_sum_process_sum_data(struct jffs2_sb_info *c, struct jffs2_eraseblock *jeb, in jffs2_sum_process_sum_data() argument
403 err = jffs2_prealloc_raw_node_refs(c, jeb, 2); in jffs2_sum_process_sum_data()
415 jeb->offset + je32_to_cpu(spi->offset), in jffs2_sum_process_sum_data()
[all …]
Dnodelist.c610 struct jffs2_eraseblock *jeb, in jffs2_link_node_ref() argument
616 BUG_ON(!jeb->allocated_refs); in jffs2_link_node_ref()
617 jeb->allocated_refs--; in jffs2_link_node_ref()
619 ref = jeb->last_node; in jffs2_link_node_ref()
636 if (!jeb->first_node) { in jffs2_link_node_ref()
637 jeb->first_node = ref; in jffs2_link_node_ref()
638 BUG_ON(ref_offset(ref) != jeb->offset); in jffs2_link_node_ref()
639 } else if (unlikely(ref_offset(ref) != jeb->offset + c->sector_size - jeb->free_size)) { in jffs2_link_node_ref()
640 uint32_t last_len = ref_totlen(c, jeb, jeb->last_node); in jffs2_link_node_ref()
644 ref_offset(jeb->last_node), in jffs2_link_node_ref()
[all …]
Dwbuf.c117 struct jffs2_eraseblock *jeb = list_entry(this, struct jffs2_eraseblock, list); in jffs2_refile_wbuf_blocks() local
120 jeb->offset); in jffs2_refile_wbuf_blocks()
126 list_add_tail(&jeb->list, &c->erase_pending_list); in jffs2_refile_wbuf_blocks()
133 list_add_tail(&jeb->list, &c->erasable_list); in jffs2_refile_wbuf_blocks()
141 static void jffs2_block_refile(struct jffs2_sb_info *c, struct jffs2_eraseblock *jeb, int allow_emp… in jffs2_block_refile() argument
143 jffs2_dbg(1, "About to refile bad block at %08x\n", jeb->offset); in jffs2_block_refile()
146 if (c->nextblock == jeb) in jffs2_block_refile()
149 list_del(&jeb->list); in jffs2_block_refile()
150 if (jeb->first_node) { in jffs2_block_refile()
152 jeb->offset); in jffs2_block_refile()
[all …]
Dgc.c28 static int jffs2_garbage_collect_metadata(struct jffs2_sb_info *c, struct jffs2_eraseblock *jeb,
30 static int jffs2_garbage_collect_dirent(struct jffs2_sb_info *c, struct jffs2_eraseblock *jeb,
32 …ic int jffs2_garbage_collect_deletion_dirent(struct jffs2_sb_info *c, struct jffs2_eraseblock *jeb,
34 static int jffs2_garbage_collect_hole(struct jffs2_sb_info *c, struct jffs2_eraseblock *jeb,
37 static int jffs2_garbage_collect_dnode(struct jffs2_sb_info *c, struct jffs2_eraseblock *jeb,
40 static int jffs2_garbage_collect_live(struct jffs2_sb_info *c, struct jffs2_eraseblock *jeb,
128 struct jffs2_eraseblock *jeb; in jffs2_garbage_collect_pass() local
242 jeb = c->gcblock; in jffs2_garbage_collect_pass()
244 if (!jeb) in jffs2_garbage_collect_pass()
245 jeb = jffs2_find_gc_block(c); in jffs2_garbage_collect_pass()
[all …]
Dmalloc.c211 struct jffs2_eraseblock *jeb, int nr) in jffs2_prealloc_raw_node_refs() argument
218 p = &jeb->last_node; in jffs2_prealloc_raw_node_refs()
221 dbg_memalloc("Reserving %d refs for block @0x%08x\n", nr, jeb->offset); in jffs2_prealloc_raw_node_refs()
242 jeb->allocated_refs = nr; in jffs2_prealloc_raw_node_refs()
245 nr, jeb->offset, jeb->last_node, jeb->last_node->flash_offset, in jffs2_prealloc_raw_node_refs()
246 jeb->last_node->next_in_ino); in jffs2_prealloc_raw_node_refs()
Dos-linux.h76 #define jffs2_write_nand_cleanmarker(c,jeb) (-EIO) argument
82 #define jffs2_write_nand_badblock(c,jeb,bad_offset) (1) argument
118 int jffs2_check_oob_empty(struct jffs2_sb_info *c, struct jffs2_eraseblock *jeb,int mode);
119 int jffs2_check_nand_cleanmarker(struct jffs2_sb_info *c, struct jffs2_eraseblock *jeb);
120 int jffs2_write_nand_cleanmarker(struct jffs2_sb_info *c, struct jffs2_eraseblock *jeb);
121 int jffs2_write_nand_badblock(struct jffs2_sb_info *c, struct jffs2_eraseblock *jeb, uint32_t bad_o…
Dnodelist.h372 struct jffs2_eraseblock *jeb,
376 struct jffs2_eraseblock *jeb,
432 struct jffs2_eraseblock *jeb, int nr);
460 int jffs2_scan_classify_jeb(struct jffs2_sb_info *c, struct jffs2_eraseblock *jeb);
461 int jffs2_scan_dirty_space(struct jffs2_sb_info *c, struct jffs2_eraseblock *jeb, uint32_t size);
468 void jffs2_free_jeb_node_refs(struct jffs2_sb_info *c, struct jffs2_eraseblock *jeb);
474 int jffs2_check_nand_cleanmarker(struct jffs2_sb_info *c, struct jffs2_eraseblock *jeb);
475 int jffs2_write_nand_cleanmarker(struct jffs2_sb_info *c, struct jffs2_eraseblock *jeb);
Dwrite.c131 struct jffs2_eraseblock *jeb = &c->blocks[flash_ofs / c->sector_size]; in jffs2_write_dnode() local
137 jffs2_dbg_acct_sanity_check(c,jeb); in jffs2_write_dnode()
138 jffs2_dbg_acct_paranoia_check(c, jeb); in jffs2_write_dnode()
158 jffs2_dbg_acct_sanity_check(c,jeb); in jffs2_write_dnode()
159 jffs2_dbg_acct_paranoia_check(c, jeb); in jffs2_write_dnode()
283 struct jffs2_eraseblock *jeb = &c->blocks[flash_ofs / c->sector_size]; in jffs2_write_dirent() local
289 jffs2_dbg_acct_sanity_check(c,jeb); in jffs2_write_dirent()
290 jffs2_dbg_acct_paranoia_check(c, jeb); in jffs2_write_dirent()
309 jffs2_dbg_acct_sanity_check(c,jeb); in jffs2_write_dirent()
310 jffs2_dbg_acct_paranoia_check(c, jeb); in jffs2_write_dirent()
Dreadinode.c35 struct jffs2_eraseblock *jeb; in check_node_data() local
114 jeb = &c->blocks[ref->flash_offset / c->sector_size]; in check_node_data()
115 len = ref_totlen(c, jeb, ref); in check_node_data()
126 jeb->used_size += len; in check_node_data()
127 jeb->unchecked_size -= len; in check_node_data()
130 jffs2_dbg_acct_paranoia_check_nolock(c, jeb); in check_node_data()
626 struct jffs2_eraseblock *jeb; in read_direntry() local
637 jeb = &c->blocks[ref->flash_offset / c->sector_size]; in read_direntry()
638 len = ref_totlen(c, jeb, ref); in read_direntry()
641 jeb->used_size += len; in read_direntry()
[all …]
Dxattr.c134 struct jffs2_eraseblock *jeb; in do_verify_xattr_datum() local
184 jeb = &c->blocks[ref_offset(raw) / c->sector_size]; in do_verify_xattr_datum()
185 totlen = PAD(ref_totlen(c, jeb, raw)); in do_verify_xattr_datum()
188 jeb->unchecked_size -= totlen; jeb->used_size += totlen; in do_verify_xattr_datum()
445 struct jffs2_eraseblock *jeb; in verify_xattr_ref() local
490 jeb = &c->blocks[ref_offset(raw) / c->sector_size]; in verify_xattr_ref()
491 totlen = PAD(ref_totlen(c, jeb, raw)); in verify_xattr_ref()
494 jeb->unchecked_size -= totlen; jeb->used_size += totlen; in verify_xattr_ref()
1286 struct jffs2_eraseblock *jeb; in jffs2_verify_xattr() local
1301 jeb = &c->blocks[ref_offset(raw) / c->sector_size]; in jffs2_verify_xattr()
[all …]
Dsummary.h189 int jffs2_sum_scan_sumnode(struct jffs2_sb_info *c, struct jffs2_eraseblock *jeb,