Home
last modified time | relevance | path

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

/Linux-v5.15/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.c243 static void jffs2_close_nextblock(struct jffs2_sb_info *c, struct jffs2_eraseblock *jeb) in jffs2_close_nextblock() argument
248 __func__, jeb->offset); in jffs2_close_nextblock()
252 if (ISDIRTY (jeb->wasted_size + jeb->dirty_size)) { in jffs2_close_nextblock()
253 c->dirty_size += jeb->wasted_size; in jffs2_close_nextblock()
254 c->wasted_size -= jeb->wasted_size; in jffs2_close_nextblock()
255 jeb->dirty_size += jeb->wasted_size; in jffs2_close_nextblock()
256 jeb->wasted_size = 0; in jffs2_close_nextblock()
257 if (VERYDIRTY(c, jeb->dirty_size)) { in jffs2_close_nextblock()
259 jeb->offset, jeb->free_size, jeb->dirty_size, in jffs2_close_nextblock()
260 jeb->used_size); in jffs2_close_nextblock()
[all …]
Derase.c24 static void jffs2_erase_failed(struct jffs2_sb_info *c, struct jffs2_eraseblock *jeb, uint32_t bad_…
25 static void jffs2_erase_succeeded(struct jffs2_sb_info *c, struct jffs2_eraseblock *jeb);
26 static void jffs2_mark_erased_block(struct jffs2_sb_info *c, struct jffs2_eraseblock *jeb);
29 struct jffs2_eraseblock *jeb) in jffs2_erase_block() argument
34 ret = jffs2_flash_erase(c, jeb); in jffs2_erase_block()
36 jffs2_erase_succeeded(c, jeb); in jffs2_erase_block()
39 bad_offset = jeb->offset; in jffs2_erase_block()
45 jeb->offset, jeb->offset, jeb->offset + c->sector_size); in jffs2_erase_block()
51 list_move(&jeb->list, &c->erase_pending_list); in jffs2_erase_block()
54 jeb->dirty_size = c->sector_size; 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.h175 struct jffs2_eraseblock *jeb);
178 struct jffs2_eraseblock *jeb);
187 struct jffs2_eraseblock *jeb);
190 struct jffs2_eraseblock *jeb);
197 __jffs2_dbg_dump_jeb(struct jffs2_sb_info *c, struct jffs2_eraseblock *jeb);
199 __jffs2_dbg_dump_jeb_nolock(struct jffs2_eraseblock *jeb);
206 struct jffs2_eraseblock *jeb);
209 struct jffs2_eraseblock *jeb);
224 #define jffs2_dbg_acct_paranoia_check(c, jeb) \ argument
225 __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.c586 struct jffs2_eraseblock *jeb, in jffs2_link_node_ref() argument
592 BUG_ON(!jeb->allocated_refs); in jffs2_link_node_ref()
593 jeb->allocated_refs--; in jffs2_link_node_ref()
595 ref = jeb->last_node; in jffs2_link_node_ref()
612 if (!jeb->first_node) { in jffs2_link_node_ref()
613 jeb->first_node = ref; in jffs2_link_node_ref()
614 BUG_ON(ref_offset(ref) != jeb->offset); in jffs2_link_node_ref()
615 } else if (unlikely(ref_offset(ref) != jeb->offset + c->sector_size - jeb->free_size)) { in jffs2_link_node_ref()
616 uint32_t last_len = ref_totlen(c, jeb, jeb->last_node); in jffs2_link_node_ref()
620 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
262 jeb = c->gcblock; in jffs2_garbage_collect_pass()
264 if (!jeb) in jffs2_garbage_collect_pass()
265 jeb = jffs2_find_gc_block(c); in jffs2_garbage_collect_pass()
[all …]
Dmalloc.c202 struct jffs2_eraseblock *jeb, int nr) in jffs2_prealloc_raw_node_refs() argument
209 p = &jeb->last_node; in jffs2_prealloc_raw_node_refs()
212 dbg_memalloc("Reserving %d refs for block @0x%08x\n", nr, jeb->offset); in jffs2_prealloc_raw_node_refs()
233 jeb->allocated_refs = nr; in jffs2_prealloc_raw_node_refs()
236 nr, jeb->offset, jeb->last_node, jeb->last_node->flash_offset, in jffs2_prealloc_raw_node_refs()
237 jeb->last_node->next_in_ino); in jffs2_prealloc_raw_node_refs()
Dos-linux.h77 #define jffs2_write_nand_cleanmarker(c,jeb) (-EIO) argument
83 #define jffs2_write_nand_badblock(c,jeb,bad_offset) (1) argument
119 int jffs2_check_oob_empty(struct jffs2_sb_info *c, struct jffs2_eraseblock *jeb,int mode);
120 int jffs2_check_nand_cleanmarker(struct jffs2_sb_info *c, struct jffs2_eraseblock *jeb);
121 int jffs2_write_nand_cleanmarker(struct jffs2_sb_info *c, struct jffs2_eraseblock *jeb);
122 int jffs2_write_nand_badblock(struct jffs2_sb_info *c, struct jffs2_eraseblock *jeb, uint32_t bad_o…
Dnodelist.h376 struct jffs2_eraseblock *jeb,
380 struct jffs2_eraseblock *jeb,
436 struct jffs2_eraseblock *jeb, int nr);
464 int jffs2_scan_classify_jeb(struct jffs2_sb_info *c, struct jffs2_eraseblock *jeb);
465 int jffs2_scan_dirty_space(struct jffs2_sb_info *c, struct jffs2_eraseblock *jeb, uint32_t size);
472 void jffs2_free_jeb_node_refs(struct jffs2_sb_info *c, struct jffs2_eraseblock *jeb);
478 int jffs2_check_nand_cleanmarker(struct jffs2_sb_info *c, struct jffs2_eraseblock *jeb);
479 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()
606 struct jffs2_eraseblock *jeb; in read_direntry() local
617 jeb = &c->blocks[ref->flash_offset / c->sector_size]; in read_direntry()
618 len = ref_totlen(c, jeb, ref); in read_direntry()
621 jeb->used_size += len; in read_direntry()
[all …]
Dxattr.c135 struct jffs2_eraseblock *jeb; in do_verify_xattr_datum() local
185 jeb = &c->blocks[ref_offset(raw) / c->sector_size]; in do_verify_xattr_datum()
186 totlen = PAD(ref_totlen(c, jeb, raw)); in do_verify_xattr_datum()
189 jeb->unchecked_size -= totlen; jeb->used_size += totlen; in do_verify_xattr_datum()
446 struct jffs2_eraseblock *jeb; in verify_xattr_ref() local
491 jeb = &c->blocks[ref_offset(raw) / c->sector_size]; in verify_xattr_ref()
492 totlen = PAD(ref_totlen(c, jeb, raw)); in verify_xattr_ref()
495 jeb->unchecked_size -= totlen; jeb->used_size += totlen; in verify_xattr_ref()
1292 struct jffs2_eraseblock *jeb; in jffs2_verify_xattr() local
1307 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,
/Linux-v5.15/kernel/
Djump_label.c38 const struct jump_entry *jeb = b; in jump_label_cmp() local
43 if (jump_entry_key(jea) < jump_entry_key(jeb)) in jump_label_cmp()
46 if (jump_entry_key(jea) > jump_entry_key(jeb)) in jump_label_cmp()
54 if (jump_entry_code(jea) < jump_entry_code(jeb)) in jump_label_cmp()
57 if (jump_entry_code(jea) > jump_entry_code(jeb)) in jump_label_cmp()
67 struct jump_entry *jeb = b; in jump_label_swap() local
70 jea->code = jeb->code - delta; in jump_label_swap()
71 jea->target = jeb->target - delta; in jump_label_swap()
72 jea->key = jeb->key - delta; in jump_label_swap()
74 jeb->code = tmp.code + delta; in jump_label_swap()
[all …]