wl_get_wle(9)
π wl_get_wle(9) β like, the kernel API manual bestie π
okay so this is a section 9 page from the Kernel API Manual, and the star of the show is wl_get_wle β¨ buckle up, it's a short one but it's iconic.
π NAME π
wl_get_wle β get a mean wl entry to be used by ubi_wl_get_peb() or refill_wl_user_pool() π«Ά
like yes, that's literally the whole vibe: it hands you a mean wear-leveling entry, and the two functions that wanna use it are ubi_wl_get_peb() and refill_wl_user_pool(). no cap, those are the exact names, don't @ me.
β¨ SYNOPSIS β¨
struct ubi_wl_entry * wl_get_wle (struct ubi_device *ubi );
that's it. that's the whole signature. she's compact, she's efficient, she ate π
πΈ ARGUMENTS πΈ
ubiβ a UBI device description object π¦ that's the one and only thing you pass in, and it's literally the description of your UBI device, periodt.
π¦ DESCRIPTION π¦
so here's the tea β this function returns a wear leveling entry in case of success, and NULL in case of failure π
that's it. that's the whole description. no hidden lore, no extra options, no environments variables, no exit statuses β just "you get a struct ubi_wl_entry *, or you get NULL" π
lowkey important: check for that NULL, bestie. failure is a real possibility here, it's not just decorative π
π SEE ALSO π
first up, the kernel file where this whole situation lives: ./drivers/mtd/ubi/wl.c π and then the extended fam, in exactly this order:
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)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_wl_tree(9)self_check_in_pq(9)produce_free_peb(9)ubi_wl_get_peb(9)
thirty-four references, all present and accounted for, not me counting them or anything πβ¨ iykyk.
and that's the page!! π«Ά this lil beauty comes from ./drivers/mtd/ubi and it's dated October 2026 β so mark your calendar, bestie, this one's from the future πβπ
π¦ 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