Lines Matching refs:jeb

252 	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()
416 jeb->offset + je32_to_cpu(spi->offset) + je32_to_cpu(spi->totlen)); in jffs2_sum_process_sum_data()
424 sum_link_node_ref(c, jeb, je32_to_cpu(spi->offset) | REF_UNCHECKED, in jffs2_sum_process_sum_data()
440 jeb->offset + je32_to_cpu(spd->offset), in jffs2_sum_process_sum_data()
441 jeb->offset + je32_to_cpu(spd->offset) + je32_to_cpu(spd->totlen)); in jffs2_sum_process_sum_data()
448 jeb->offset + in jffs2_sum_process_sum_data()
454 jeb->offset + in jffs2_sum_process_sum_data()
473 fd->raw = sum_link_node_ref(c, jeb, je32_to_cpu(spd->offset) | REF_UNCHECKED, in jffs2_sum_process_sum_data()
497 jeb->offset + je32_to_cpu(spx->offset), in jffs2_sum_process_sum_data()
498 jeb->offset + je32_to_cpu(spx->offset) + je32_to_cpu(spx->totlen), in jffs2_sum_process_sum_data()
508 = sum_link_node_ref(c, jeb, je32_to_cpu(spx->offset) | REF_UNCHECKED, in jffs2_sum_process_sum_data()
514 sum_link_node_ref(c, jeb, je32_to_cpu(spx->offset) | REF_UNCHECKED, in jffs2_sum_process_sum_data()
528 jeb->offset + je32_to_cpu(spr->offset), in jffs2_sum_process_sum_data()
529 jeb->offset + je32_to_cpu(spr->offset) + in jffs2_sum_process_sum_data()
540 sum_link_node_ref(c, jeb, je32_to_cpu(spr->offset) | REF_UNCHECKED, in jffs2_sum_process_sum_data()
556 c->wasted_size -= jeb->wasted_size; in jffs2_sum_process_sum_data()
557 c->free_size += c->sector_size - jeb->free_size; in jffs2_sum_process_sum_data()
558 c->used_size -= jeb->used_size; in jffs2_sum_process_sum_data()
559 c->dirty_size -= jeb->dirty_size; in jffs2_sum_process_sum_data()
560 jeb->wasted_size = jeb->used_size = jeb->dirty_size = 0; in jffs2_sum_process_sum_data()
561 jeb->free_size = c->sector_size; in jffs2_sum_process_sum_data()
563 jffs2_free_jeb_node_refs(c, jeb); in jffs2_sum_process_sum_data()
572 int jffs2_sum_scan_sumnode(struct jffs2_sb_info *c, struct jffs2_eraseblock *jeb, in jffs2_sum_scan_sumnode() argument
583 jeb->offset, jeb->offset + ofs, sumsize); in jffs2_sum_scan_sumnode()
620 ret = jffs2_prealloc_raw_node_refs(c, jeb, 1); in jffs2_sum_scan_sumnode()
627 if ((ret = jffs2_scan_dirty_space(c, jeb, PAD(je32_to_cpu(summary->cln_mkr))))) in jffs2_sum_scan_sumnode()
629 } else if (jeb->first_node) { in jffs2_sum_scan_sumnode()
631 "(0x%08x)\n", jeb->offset); in jffs2_sum_scan_sumnode()
632 if ((ret = jffs2_scan_dirty_space(c, jeb, PAD(je32_to_cpu(summary->cln_mkr))))) in jffs2_sum_scan_sumnode()
635 jffs2_link_node_ref(c, jeb, jeb->offset | REF_NORMAL, in jffs2_sum_scan_sumnode()
640 ret = jffs2_sum_process_sum_data(c, jeb, summary, pseudo_random); in jffs2_sum_scan_sumnode()
649 ret = jffs2_prealloc_raw_node_refs(c, jeb, 2); in jffs2_sum_scan_sumnode()
653 sum_link_node_ref(c, jeb, ofs | REF_NORMAL, sumsize, NULL); in jffs2_sum_scan_sumnode()
655 if (unlikely(jeb->free_size)) { in jffs2_sum_scan_sumnode()
657 jeb->free_size, jeb->offset); in jffs2_sum_scan_sumnode()
658 jeb->wasted_size += jeb->free_size; in jffs2_sum_scan_sumnode()
659 c->wasted_size += jeb->free_size; in jffs2_sum_scan_sumnode()
660 c->free_size -= jeb->free_size; in jffs2_sum_scan_sumnode()
661 jeb->free_size = 0; in jffs2_sum_scan_sumnode()
664 return jffs2_scan_classify_jeb(c, jeb); in jffs2_sum_scan_sumnode()
674 static int jffs2_sum_write_data(struct jffs2_sb_info *c, struct jffs2_eraseblock *jeb, in jffs2_sum_write_data() argument
691 datasize, padsize, jeb->offset); in jffs2_sum_write_data()
806 sm->offset = cpu_to_je32(c->sector_size - jeb->free_size); in jffs2_sum_write_data()
817 sum_ofs = jeb->offset + c->sector_size - jeb->free_size; in jffs2_sum_write_data()
831 jffs2_link_node_ref(c, jeb, sum_ofs | REF_OBSOLETE, infosize, NULL); in jffs2_sum_write_data()
841 jffs2_link_node_ref(c, jeb, sum_ofs | REF_NORMAL, infosize, NULL); in jffs2_sum_write_data()
853 struct jffs2_eraseblock *jeb; in jffs2_sum_write_sumnode() local
860 jeb = c->nextblock; in jffs2_sum_write_sumnode()
861 jffs2_prealloc_raw_node_refs(c, jeb, 1); in jffs2_sum_write_sumnode()
870 padsize = jeb->free_size - infosize; in jffs2_sum_write_sumnode()
874 ret = jffs2_sum_write_data(c, jeb, infosize, datasize, padsize); in jffs2_sum_write_sumnode()