Lines Matching full:this

8  * For licensing information, see the file 'LICENCE' in this directory.
22 struct jffs2_node_frag *this);
100 struct jffs2_node_frag *this) in jffs2_obsolete_node_frag() argument
102 if (this->node) { in jffs2_obsolete_node_frag()
103 this->node->frags--; in jffs2_obsolete_node_frag()
104 if (!this->node->frags) { in jffs2_obsolete_node_frag()
107 ref_offset(this->node->raw), this->node->ofs, this->node->ofs+this->node->size); in jffs2_obsolete_node_frag()
108 jffs2_mark_node_obsolete(c, this->node->raw); in jffs2_obsolete_node_frag()
109 jffs2_free_full_dnode(this->node); in jffs2_obsolete_node_frag()
112 …ref_offset(this->node->raw), this->node->ofs, this->node->ofs+this->node->size, this->node->frags); in jffs2_obsolete_node_frag()
113 mark_ref_normal(this->node->raw); in jffs2_obsolete_node_frag()
117 jffs2_free_node_frag(this); in jffs2_obsolete_node_frag()
169 struct jffs2_node_frag *this, uint32_t lastend) in no_overlapping_node() argument
181 if (this) { in no_overlapping_node()
182 /* By definition, the 'this' node has no right-hand child, in no_overlapping_node()
187 rb_link_node(&holefrag->rb, &this->rb, &this->rb.rb_right); in no_overlapping_node()
194 this = holefrag; in no_overlapping_node()
197 if (this) { in no_overlapping_node()
198 /* By definition, the 'this' node has no right-hand child, in no_overlapping_node()
202 rb_link_node(&newfrag->rb, &this->rb, &this->rb.rb_right); in no_overlapping_node()
215 struct jffs2_node_frag *this; in jffs2_add_frag_to_fragtree() local
218 /* Skip all the nodes which are completed before this one starts */ in jffs2_add_frag_to_fragtree()
219 this = jffs2_lookup_node_frag(root, newfrag->node->ofs); in jffs2_add_frag_to_fragtree()
221 if (this) { in jffs2_add_frag_to_fragtree()
223 this->ofs, this->ofs+this->size, this->node?(ref_offset(this->node->raw)):0xffffffff, this); in jffs2_add_frag_to_fragtree()
224 lastend = this->ofs + this->size; in jffs2_add_frag_to_fragtree()
234 /* Check if 'this' node was on the same page as the new node. in jffs2_add_frag_to_fragtree()
235 If so, both 'this' and the new node get marked REF_NORMAL so in jffs2_add_frag_to_fragtree()
239 if (this->node) in jffs2_add_frag_to_fragtree()
240 mark_ref_normal(this->node->raw); in jffs2_add_frag_to_fragtree()
244 return no_overlapping_node(c, root, newfrag, this, lastend); in jffs2_add_frag_to_fragtree()
247 if (this->node) in jffs2_add_frag_to_fragtree()
249 this->ofs, this->ofs + this->size, in jffs2_add_frag_to_fragtree()
250 ref_offset(this->node->raw), ref_flags(this->node->raw)); in jffs2_add_frag_to_fragtree()
253 this->ofs, this->ofs + this->size); in jffs2_add_frag_to_fragtree()
255 /* OK. 'this' is pointing at the first frag that newfrag->ofs at least partially obsoletes, in jffs2_add_frag_to_fragtree()
256 * - i.e. newfrag->ofs < this->ofs+this->size && newfrag->ofs >= this->ofs in jffs2_add_frag_to_fragtree()
258 if (newfrag->ofs > this->ofs) { in jffs2_add_frag_to_fragtree()
259 /* This node isn't completely obsoleted. The start of it remains valid */ in jffs2_add_frag_to_fragtree()
264 if (this->node) in jffs2_add_frag_to_fragtree()
265 mark_ref_normal(this->node->raw); in jffs2_add_frag_to_fragtree()
267 if (this->ofs + this->size > newfrag->ofs + newfrag->size) { in jffs2_add_frag_to_fragtree()
268 /* The new node splits 'this' frag into two */ in jffs2_add_frag_to_fragtree()
271 if (this->node) in jffs2_add_frag_to_fragtree()
273 this->ofs, this->ofs+this->size, ref_offset(this->node->raw)); in jffs2_add_frag_to_fragtree()
276 this->ofs, this->ofs+this->size); in jffs2_add_frag_to_fragtree()
278 /* New second frag pointing to this's node */ in jffs2_add_frag_to_fragtree()
279 newfrag2 = new_fragment(this->node, newfrag->ofs + newfrag->size, in jffs2_add_frag_to_fragtree()
280 this->ofs + this->size - newfrag->ofs - newfrag->size); in jffs2_add_frag_to_fragtree()
283 if (this->node) in jffs2_add_frag_to_fragtree()
284 this->node->frags++; in jffs2_add_frag_to_fragtree()
286 /* Adjust size of original 'this' */ in jffs2_add_frag_to_fragtree()
287 this->size = newfrag->ofs - this->ofs; in jffs2_add_frag_to_fragtree()
290 greater than this->ofs but smaller than in jffs2_add_frag_to_fragtree()
293 'this' to insert newfrag, and a tree insert in jffs2_add_frag_to_fragtree()
295 jffs2_fragtree_insert(newfrag, this); in jffs2_add_frag_to_fragtree()
303 /* New node just reduces 'this' frag in size, doesn't split it */ in jffs2_add_frag_to_fragtree()
304 this->size = newfrag->ofs - this->ofs; in jffs2_add_frag_to_fragtree()
307 jffs2_fragtree_insert(newfrag, this); in jffs2_add_frag_to_fragtree()
310 /* New frag starts at the same point as 'this' used to. Replace in jffs2_add_frag_to_fragtree()
312 dbg_fragtree2("inserting newfrag (*%p),%d-%d in before 'this' (*%p),%d-%d\n", in jffs2_add_frag_to_fragtree()
313 newfrag, newfrag->ofs, newfrag->ofs+newfrag->size, this, this->ofs, this->ofs+this->size); in jffs2_add_frag_to_fragtree()
315 rb_replace_node(&this->rb, &newfrag->rb, root); in jffs2_add_frag_to_fragtree()
317 if (newfrag->ofs + newfrag->size >= this->ofs+this->size) { in jffs2_add_frag_to_fragtree()
318 dbg_fragtree2("obsoleting node frag %p (%x-%x)\n", this, this->ofs, this->ofs+this->size); in jffs2_add_frag_to_fragtree()
319 jffs2_obsolete_node_frag(c, this); in jffs2_add_frag_to_fragtree()
321 this->ofs += newfrag->size; in jffs2_add_frag_to_fragtree()
322 this->size -= newfrag->size; in jffs2_add_frag_to_fragtree()
324 jffs2_fragtree_insert(this, newfrag); in jffs2_add_frag_to_fragtree()
325 rb_insert_color(&this->rb, root); in jffs2_add_frag_to_fragtree()
332 while ((this = frag_next(newfrag)) && newfrag->ofs + newfrag->size >= this->ofs + this->size) { in jffs2_add_frag_to_fragtree()
333 /* 'this' frag is obsoleted completely. */ in jffs2_add_frag_to_fragtree()
335 this, this->ofs, this->ofs+this->size); in jffs2_add_frag_to_fragtree()
336 rb_erase(&this->rb, root); in jffs2_add_frag_to_fragtree()
337 jffs2_obsolete_node_frag(c, this); in jffs2_add_frag_to_fragtree()
342 if (!this || newfrag->ofs + newfrag->size == this->ofs) in jffs2_add_frag_to_fragtree()
346 this->size = (this->ofs + this->size) - (newfrag->ofs + newfrag->size); in jffs2_add_frag_to_fragtree()
347 this->ofs = newfrag->ofs + newfrag->size; in jffs2_add_frag_to_fragtree()
350 if (this->node) in jffs2_add_frag_to_fragtree()
351 mark_ref_normal(this->node->raw); in jffs2_add_frag_to_fragtree()
414 /* During mount, this needs no locking. During normal operation, its
488 struct jffs2_inode_cache *this, *next; in jffs2_free_ino_caches() local
491 this = c->inocache_list[i]; in jffs2_free_ino_caches()
492 while (this) { in jffs2_free_ino_caches()
493 next = this->next; in jffs2_free_ino_caches()
494 jffs2_xattr_free_inode(c, this); in jffs2_free_ino_caches()
495 jffs2_free_inode_cache(this); in jffs2_free_ino_caches()
496 this = next; in jffs2_free_ino_caches()
505 struct jffs2_raw_node_ref *this, *next; in jffs2_free_raw_node_refs() local
508 this = c->blocks[i].first_node; in jffs2_free_raw_node_refs()
509 while (this) { in jffs2_free_raw_node_refs()
510 if (this[REFS_PER_BLOCK].flash_offset == REF_LINK_NODE) in jffs2_free_raw_node_refs()
511 next = this[REFS_PER_BLOCK].next_in_ino; in jffs2_free_raw_node_refs()
515 jffs2_free_refblock(this); in jffs2_free_raw_node_refs()
516 this = next; in jffs2_free_raw_node_refs()
586 of this node. Free the node */ in jffs2_kill_fragtree()