Lines Matching refs:ofs

66 	if (frag && frag->ofs != size) {  in jffs2_truncate_fragtree()
67 if (frag->ofs+frag->size > size) { in jffs2_truncate_fragtree()
68 frag->size = size - frag->ofs; in jffs2_truncate_fragtree()
72 while (frag && frag->ofs >= size) { in jffs2_truncate_fragtree()
88 if (frag->ofs + frag->size < size) in jffs2_truncate_fragtree()
89 return frag->ofs + frag->size; in jffs2_truncate_fragtree()
93 if (frag->node && (frag->ofs & (PAGE_SIZE - 1)) == 0) { in jffs2_truncate_fragtree()
95 frag->ofs, frag->ofs + frag->size); in jffs2_truncate_fragtree()
109 ref_offset(this->node->raw), this->node->ofs, this->node->ofs+this->node->size); in jffs2_obsolete_node_frag()
114 …ref_offset(this->node->raw), this->node->ofs, this->node->ofs+this->node->size, this->node->frags); in jffs2_obsolete_node_frag()
127 dbg_fragtree2("insert frag (0x%04x-0x%04x)\n", newfrag->ofs, newfrag->ofs + newfrag->size); in jffs2_fragtree_insert()
133 if (newfrag->ofs > base->ofs) in jffs2_fragtree_insert()
135 else if (newfrag->ofs < base->ofs) in jffs2_fragtree_insert()
138 JFFS2_ERROR("duplicate frag at %08x (%p,%p)\n", newfrag->ofs, newfrag, base); in jffs2_fragtree_insert()
149 static struct jffs2_node_frag * new_fragment(struct jffs2_full_dnode *fn, uint32_t ofs, uint32_t si… in new_fragment() argument
155 newfrag->ofs = ofs; in new_fragment()
173 if (lastend < newfrag->node->ofs) { in no_overlapping_node()
177 holefrag= new_fragment(NULL, lastend, newfrag->node->ofs - lastend); in no_overlapping_node()
188 holefrag->ofs, holefrag->ofs + holefrag->size); in no_overlapping_node()
192 holefrag->ofs, holefrag->ofs + holefrag->size); in no_overlapping_node()
221 this = jffs2_lookup_node_frag(root, newfrag->node->ofs); in jffs2_add_frag_to_fragtree()
225 this->ofs, this->ofs+this->size, this->node?(ref_offset(this->node->raw)):0xffffffff, this); in jffs2_add_frag_to_fragtree()
226 lastend = this->ofs + this->size; in jffs2_add_frag_to_fragtree()
233 if (lastend <= newfrag->ofs) { in jffs2_add_frag_to_fragtree()
240 if (lastend && (lastend-1) >> PAGE_SHIFT == newfrag->ofs >> PAGE_SHIFT) { in jffs2_add_frag_to_fragtree()
251 this->ofs, this->ofs + this->size, in jffs2_add_frag_to_fragtree()
255 this->ofs, this->ofs + this->size); in jffs2_add_frag_to_fragtree()
260 if (newfrag->ofs > this->ofs) { in jffs2_add_frag_to_fragtree()
269 if (this->ofs + this->size > newfrag->ofs + newfrag->size) { in jffs2_add_frag_to_fragtree()
275 this->ofs, this->ofs+this->size, ref_offset(this->node->raw)); in jffs2_add_frag_to_fragtree()
278 this->ofs, this->ofs+this->size); in jffs2_add_frag_to_fragtree()
281 newfrag2 = new_fragment(this->node, newfrag->ofs + newfrag->size, in jffs2_add_frag_to_fragtree()
282 this->ofs + this->size - newfrag->ofs - newfrag->size); in jffs2_add_frag_to_fragtree()
289 this->size = newfrag->ofs - this->ofs; in jffs2_add_frag_to_fragtree()
306 this->size = newfrag->ofs - this->ofs; in jffs2_add_frag_to_fragtree()
315 newfrag, newfrag->ofs, newfrag->ofs+newfrag->size, this, this->ofs, this->ofs+this->size); in jffs2_add_frag_to_fragtree()
319 if (newfrag->ofs + newfrag->size >= this->ofs+this->size) { in jffs2_add_frag_to_fragtree()
320 dbg_fragtree2("obsoleting node frag %p (%x-%x)\n", this, this->ofs, this->ofs+this->size); in jffs2_add_frag_to_fragtree()
323 this->ofs += newfrag->size; in jffs2_add_frag_to_fragtree()
334 while ((this = frag_next(newfrag)) && newfrag->ofs + newfrag->size >= this->ofs + this->size) { in jffs2_add_frag_to_fragtree()
337 this, this->ofs, this->ofs+this->size); in jffs2_add_frag_to_fragtree()
344 if (!this || newfrag->ofs + newfrag->size == this->ofs) in jffs2_add_frag_to_fragtree()
348 this->size = (this->ofs + this->size) - (newfrag->ofs + newfrag->size); in jffs2_add_frag_to_fragtree()
349 this->ofs = newfrag->ofs + newfrag->size; in jffs2_add_frag_to_fragtree()
371 newfrag = new_fragment(fn, fn->ofs, fn->size); in jffs2_add_full_dnode_to_inode()
377 fn->ofs, fn->ofs+fn->size, ref_offset(fn->raw), newfrag); in jffs2_add_full_dnode_to_inode()
385 if (newfrag->ofs & (PAGE_SIZE-1)) { in jffs2_add_full_dnode_to_inode()
394 if ((newfrag->ofs+newfrag->size) & (PAGE_SIZE-1)) { in jffs2_add_full_dnode_to_inode()
539 if (frag->ofs + frag->size <= offset) { in jffs2_lookup_node_frag()
541 if (!prev || frag->ofs > prev->ofs) in jffs2_lookup_node_frag()
544 } else if (frag->ofs > offset) { in jffs2_lookup_node_frag()
556 prev->ofs, prev->ofs+prev->size); in jffs2_lookup_node_frag()
587 uint32_t ofs, uint32_t len, in jffs2_link_node_ref() argument
608 ref->flash_offset, ofs, ref->next_in_ino, len); in jffs2_link_node_ref()
610 ref->flash_offset = ofs; in jffs2_link_node_ref()
682 uint32_t ofs = jeb->offset + c->sector_size - jeb->free_size; in jffs2_scan_dirty_space() local
683 ofs |= REF_OBSOLETE; in jffs2_scan_dirty_space()
685 jffs2_link_node_ref(c, jeb, ofs, size, NULL); in jffs2_scan_dirty_space()