Lines Matching refs:scrub
39 * used eraseblocks are kept in @wl->used, @wl->erroneous, or @wl->scrub
69 * o scrubbing is needed (@wl->scrub tree).
674 (!ubi->used.rb_node && !ubi->scrub.rb_node)) {
716 } else if (!ubi->scrub.rb_node) {
718 if (!ubi->scrub.rb_node) {
746 e1 = rb_entry(rb_first(&ubi->scrub), struct ubi_wl_entry, u.rb);
751 self_check_in_wl_tree(ubi, e1, &ubi->scrub);
752 rb_erase(&e1->u.rb, &ubi->scrub);
753 dbg_wl("scrub PEB %d to PEB %d", e1->pnum, e2->pnum);
933 wl_tree_add(e1, &ubi->scrub);
1019 * If the ubi->scrub tree is not empty, scrubbing is needed, and the
1022 if (!ubi->scrub.rb_node) {
1298 } else if (in_wl_tree(e, &ubi->scrub)) {
1299 self_check_in_wl_tree(ubi, e, &ubi->scrub);
1300 rb_erase(&e->u.rb, &ubi->scrub);
1351 if (e == ubi->move_from || in_wl_tree(e, &ubi->scrub) ||
1385 wl_tree_add(e, &ubi->scrub);
1460 if (in_wl_tree(e, &ubi->scrub))
1473 * ubi_bitflip_check - Check an eraseblock for bitflips and scrub it if needed.
1563 wl_tree_add(e, &ubi->scrub);
1569 wl_tree_add(e, &ubi->scrub);
1778 ubi->used = ubi->erroneous = ubi->free = ubi->scrub = RB_ROOT;
1842 if (!aeb->scrub) {
1847 dbg_wl("add PEB %d EC %d to the scrub tree",
1849 wl_tree_add(e, &ubi->scrub);
1930 tree_destroy(ubi, &ubi->scrub);
1965 tree_destroy(ubi, &ubi->scrub);