ubi_wl_flush(9)
π ubi_wl_flush(9) β a page from the Kernel API Manual, bestie
okay so welcome to the glow-up of ubi_wl_flush(9), straight out of the kernel API manual. this is the wear-leveling girlie who makes sure all your pending work actually gets done. let's get into it π
β¨ NAME β¨
ubi_wl_flush β flush all pending works.
like, all of them. every last one. no stragglers. periodt. π
πΈ SYNOPSIS πΈ
int ubi_wl_flush (struct ubi_device *ubi , int vol_id , int lnum );
three args, one int back. she's lowkey compact, highkey powerful π¦
π«Ά ARGUMENTS π«Ά
ubiβ the UBI device description object. your main character struct, fr fr πvol_idβ the volume id to flush for. which volume are we serving today πlnumβ the logical eraseblock number to flush for. the specific little eraseblock in question β¨
π₯ DESCRIPTION π₯
okay so here's the vibe: this function executes all pending works for a particular vol_id / lnum pair β like, the whole pairing. it's giving "clean slate, nothing left hanging." π
and here's the iconic part: if either value is set to UBI_ALL, then it acts as a wildcard for all of the corresponding volume numbers or logical eraseblock numbers. so you can be like "idc which one, flush UBI_ALL of them" and she ate. πβ¨
returns zero in case of success and a negative error code in case of failure. so if you see a negative number, that's not a slay, that's a problem π
π¦ SEE ALSO π¦
kernel file ./drivers/mtd/ubi/wl.c, plus the whole friend group:
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_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)
ngl that's a whole group chat and they're all in the wl.c server π
just a lil reminder: the wildcard isUBI_ALLand it works on eithervol_idorlnum. don't forget or you'll be flushing one thing at a time like a rookie π
and that's the page!! π sign-off time: this one lives in ./drivers/mtd/ubi, dated October 2026, and yes she's still called ubi_wl_flush(9) π byeee β¨
π¦ 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