Lines Matching refs:frag
500 struct jffs2_node_frag *frag; in jffs2_garbage_collect_live() local
534 for (frag = frag_first(&f->fragtree); frag; frag = frag_next(frag)) { in jffs2_garbage_collect_live()
535 if (frag->node && frag->node->raw == raw) { in jffs2_garbage_collect_live()
536 fn = frag->node; in jffs2_garbage_collect_live()
537 end = frag->ofs + frag->size; in jffs2_garbage_collect_live()
539 start = frag->ofs; in jffs2_garbage_collect_live()
540 if (nrfrags == frag->node->frags) in jffs2_garbage_collect_live()
549 frag->node->raw = f->inocache->nodes; in jffs2_garbage_collect_live()
1018 struct jffs2_node_frag *frag; in jffs2_garbage_collect_hole() local
1083 frag = frag_last(&f->fragtree); in jffs2_garbage_collect_hole()
1084 if (frag) in jffs2_garbage_collect_hole()
1087 ilen = frag->ofs + frag->size; in jffs2_garbage_collect_hole()
1139 for (frag = jffs2_lookup_node_frag(&f->fragtree, fn->ofs); in jffs2_garbage_collect_hole()
1140 frag; frag = frag_next(frag)) { in jffs2_garbage_collect_hole()
1141 if (frag->ofs > fn->size + fn->ofs) in jffs2_garbage_collect_hole()
1143 if (frag->node == fn) { in jffs2_garbage_collect_hole()
1144 frag->node = new_fn; in jffs2_garbage_collect_hole()
1193 struct jffs2_node_frag *frag; in jffs2_garbage_collect_dnode() local
1199 frag = jffs2_lookup_node_frag(&f->fragtree, start); in jffs2_garbage_collect_dnode()
1203 BUG_ON(frag->ofs != start); in jffs2_garbage_collect_dnode()
1206 while((frag = frag_prev(frag)) && frag->ofs >= min) { in jffs2_garbage_collect_dnode()
1210 if (frag->ofs > min) { in jffs2_garbage_collect_dnode()
1212 frag->ofs, frag->ofs+frag->size); in jffs2_garbage_collect_dnode()
1213 start = frag->ofs; in jffs2_garbage_collect_dnode()
1217 if (!frag->node || !frag->node->raw) { in jffs2_garbage_collect_dnode()
1219 frag->ofs, frag->ofs+frag->size); in jffs2_garbage_collect_dnode()
1227 struct jffs2_raw_node_ref *raw = frag->node->raw; in jffs2_garbage_collect_dnode()
1234 frag->ofs, in jffs2_garbage_collect_dnode()
1235 frag->ofs + frag->size, in jffs2_garbage_collect_dnode()
1237 start = frag->ofs; in jffs2_garbage_collect_dnode()
1242 frag->ofs, in jffs2_garbage_collect_dnode()
1243 frag->ofs + frag->size, in jffs2_garbage_collect_dnode()
1249 frag->ofs, in jffs2_garbage_collect_dnode()
1250 frag->ofs + frag->size, in jffs2_garbage_collect_dnode()
1252 start = frag->ofs; in jffs2_garbage_collect_dnode()
1260 frag = jffs2_lookup_node_frag(&f->fragtree, end-1); in jffs2_garbage_collect_dnode()
1262 while((frag = frag_next(frag)) && frag->ofs+frag->size <= max) { in jffs2_garbage_collect_dnode()
1266 if (frag->ofs+frag->size < max) { in jffs2_garbage_collect_dnode()
1268 frag->ofs, frag->ofs+frag->size); in jffs2_garbage_collect_dnode()
1269 end = frag->ofs + frag->size; in jffs2_garbage_collect_dnode()
1273 if (!frag->node || !frag->node->raw) { in jffs2_garbage_collect_dnode()
1275 frag->ofs, frag->ofs+frag->size); in jffs2_garbage_collect_dnode()
1283 struct jffs2_raw_node_ref *raw = frag->node->raw; in jffs2_garbage_collect_dnode()
1290 frag->ofs, in jffs2_garbage_collect_dnode()
1291 frag->ofs + frag->size, in jffs2_garbage_collect_dnode()
1293 end = frag->ofs + frag->size; in jffs2_garbage_collect_dnode()
1298 frag->ofs, in jffs2_garbage_collect_dnode()
1299 frag->ofs + frag->size, in jffs2_garbage_collect_dnode()
1305 frag->ofs, in jffs2_garbage_collect_dnode()
1306 frag->ofs + frag->size, in jffs2_garbage_collect_dnode()
1308 end = frag->ofs + frag->size; in jffs2_garbage_collect_dnode()