Lines Matching defs:sleb
204 * @sleb: describes nodes to sort and contains the result on exit
210 * @sleb->nodes and @nondata lists correspondingly.
228 static int sort_nodes(struct ubifs_info *c, struct ubifs_scan_leb *sleb,
237 list_for_each_entry_safe(snod, tmp, &sleb->nodes, list) {
260 err = ubifs_tnc_has_node(c, &snod->key, 0, sleb->lnum,
280 list_sort(c, &sleb->nodes, &data_nodes_cmp);
283 err = dbg_check_data_nodes_order(c, &sleb->nodes);
295 * @sleb: describes the LEB to move nodes from
303 static int move_node(struct ubifs_info *c, struct ubifs_scan_leb *sleb,
313 err = ubifs_tnc_replace(c, &snod->key, sleb->lnum,
324 * @sleb: describes the LEB to move nodes from
326 * This function moves valid nodes from data LEB described by @sleb to the GC
331 static int move_nodes(struct ubifs_info *c, struct ubifs_scan_leb *sleb)
347 err = sort_nodes(c, sleb, &nondata, &min);
357 list_for_each_entry_safe(snod, tmp, &sleb->nodes, list) {
372 err = move_node(c, sleb, snod, wbuf);
404 err = move_node(c, sleb, snod, wbuf);
436 if (list_empty(&sleb->nodes) && list_empty(&nondata))
451 list_splice_tail(&nondata, &sleb->nodes);
493 struct ubifs_scan_leb *sleb;
538 sleb = ubifs_scan(c, lnum, 0, c->sbuf, 0);
539 if (IS_ERR(sleb))
540 return PTR_ERR(sleb);
542 ubifs_assert(c, !list_empty(&sleb->nodes));
543 snod = list_entry(sleb->nodes.next, struct ubifs_scan_node, list);
550 list_for_each_entry(snod, &sleb->nodes, list) {
587 err = move_nodes(c, sleb);
622 ubifs_scan_destroy(sleb);