Lines Matching refs:sleb
228 static int sort_nodes(struct ubifs_info *c, struct ubifs_scan_leb *sleb, in sort_nodes() argument
237 list_for_each_entry_safe(snod, tmp, &sleb->nodes, list) { in sort_nodes()
260 err = ubifs_tnc_has_node(c, &snod->key, 0, sleb->lnum, in sort_nodes()
280 list_sort(c, &sleb->nodes, &data_nodes_cmp); in sort_nodes()
283 err = dbg_check_data_nodes_order(c, &sleb->nodes); in sort_nodes()
303 static int move_node(struct ubifs_info *c, struct ubifs_scan_leb *sleb, in move_node() argument
313 err = ubifs_tnc_replace(c, &snod->key, sleb->lnum, in move_node()
331 static int move_nodes(struct ubifs_info *c, struct ubifs_scan_leb *sleb) in move_nodes() argument
347 err = sort_nodes(c, sleb, &nondata, &min); in move_nodes()
357 list_for_each_entry_safe(snod, tmp, &sleb->nodes, list) { in move_nodes()
372 err = move_node(c, sleb, snod, wbuf); in move_nodes()
404 err = move_node(c, sleb, snod, wbuf); in move_nodes()
436 if (list_empty(&sleb->nodes) && list_empty(&nondata)) in move_nodes()
451 list_splice_tail(&nondata, &sleb->nodes); in move_nodes()
493 struct ubifs_scan_leb *sleb; in ubifs_garbage_collect_leb() local
538 sleb = ubifs_scan(c, lnum, 0, c->sbuf, 0); in ubifs_garbage_collect_leb()
539 if (IS_ERR(sleb)) in ubifs_garbage_collect_leb()
540 return PTR_ERR(sleb); in ubifs_garbage_collect_leb()
542 ubifs_assert(c, !list_empty(&sleb->nodes)); in ubifs_garbage_collect_leb()
543 snod = list_entry(sleb->nodes.next, struct ubifs_scan_node, list); in ubifs_garbage_collect_leb()
550 list_for_each_entry(snod, &sleb->nodes, list) { in ubifs_garbage_collect_leb()
587 err = move_nodes(c, sleb); in ubifs_garbage_collect_leb()
622 ubifs_scan_destroy(sleb); in ubifs_garbage_collect_leb()