self_check_in_wl_tree(9)
π self_check_in_wl_tree β like, the whole vibe
okay so first things first, bestie: this page lives in the Kernel API Manual, and it's about self_check_in_wl_tree, which is literally just a vibe check for your wear-leveling RB-tree. that's it. that's the function. no cap. πΈ
β¨ NAME β¨
self_check_in_wl_tree β check that wear-leveling entry is in WL RB-tree.
like, it verifies that a wear-leveling entry is actually sitting in the WL RB-tree where it's supposed to be. simple. iconic. moving on. π
π¦ SYNOPSIS π¦
int self_check_in_wl_tree (const struct ubi_device *ubi , struct
ubi_wl_entry *e , struct rb_root *root );
π ARGUMENTS π
ubiβ the UBI device description object. it's giving "who am I and what device am I on" energy.eβ the wear-leveling entry to check. the main character we're doing a vibe check on, fr fr.rootβ the root of the tree. the tree we're checkingeagainst. keep up bestie π«Ά
π₯ DESCRIPTION π₯
so the whole thing is this: this function returns zero if e is in the root RB-tree, and -EINVAL if it is not. that's literally the entire personality. zero = slay, she's in the tree. -EINVAL = not in the tree, and we're telling you about it. πβ¨
ngl bestie, this is a self-check function, so if you're getting -EINVAL in a context where that's not expected, something upstream is lowkey not doing its job. that's all I'm saying. π
π SEE ALSO π
kernel file ./drivers/mtd/ubi/wl.c, plus the whole friend group of related functions β every single one of these, no skips, bestie:
wl_tree_add(9)wl_entry_destroy(9)do_work(9)in_wl_tree(9)in_pq(9)prot_queue_add(9)find_wl_entry(9)find_mean_wl_entry(9)wl_get_wle(9)prot_queue_del(9)ubi_sync_erase(9)serve_prot_queue(9)__schedule_ubi_work(9)schedule_ubi_work(9)schedule_erase(9)do_sync_erase(9)wear_leveling_worker(9)ensure_wear_leveling(9)__erase_worker(9)ubi_wl_put_peb(9)ubi_wl_scrub_peb(9)ubi_wl_flush(9)ubi_bitflip_check(9)tree_destroy(9)ubi_thread(9)shutdown_work(9)erase_aeb(9)ubi_wl_init(9)protection_queue_destroy(9)ubi_wl_close(9)self_check_ec(9)self_check_in_pq(9)produce_free_peb(9)ubi_wl_get_peb(9)
okay that's the whole page bestie, go forth and let your trees be correct π
mwah π β brought to you by the source tree at ./drivers/mtd/ubi, dated October 2026, and the one and only self_check_in_wl_tree(9) ππ¦β
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms