schedule_erase(9)
β¨ schedule_erase(9) β¨
okay so bestie, we're diving into the Kernel API Manual today β this one's schedule_erase(9) and it's literally the little function that could π«Ά it just... schedules an erase. that's the whole vibe. main character energy for a work item, ngl.
πΈ NAME πΈ
schedule_erase β schedule an erase work.
like, yes, that's it, that's the tweet π it puts an erase job on the schedule and moves on with its life.
π¦ SYNOPSIS π¦
int schedule_erase (struct ubi_device *ubi , struct ubi_wl_entry *e ,
int vol_id , int lnum , int torture , bool nested );
returns an int, takes six whole arguments, she's thriving on parameters okay π
π ARGUMENTS π
ubiβ the UBI device description object. the big boss struct, the main character of the whole subsystem π«Άeβ the WL entry of the physical eraseblock to erase. that's the actual PEB we're sending off to get wiped β¨vol_idβ the volume ID that last used this PEB. receipts of who was here last πlnumβ the last used logical eraseblock number for the PEB. the LEB tea βtortureβ if the physical eraseblock has to be tortured ππ yes that's the real name, and yes it means what it means: whether this PEB gets the torture treatmentnestedβ denotes whether thework_semis already held. lowkey important, don't lie to her about this one π
π DESCRIPTION π
so here's the whole plot: this function returns zero in case of success and a -ENOMEM in case of failure. that's it. zero? slay, we're good π
-ENOMEM? out of memory, not slay, go fix your allocation situation π
no cap, -ENOMEM is the only failure she documents here, so don't go making up other error codes, bestie.
π SEE ALSO π
okay this list is long and she ate, honestly. here's the whole squad from the kernel file ./drivers/mtd/ubi/wl.c β every single one:
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), 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)
iykyk π§π go read them, they're all in their wear-leveling era.
and that's the page, bestie! this little icon lives at ./drivers/mtd/ubi and the manual's dated October 2026 β so yes, she's from the future and she's still scheduling erases π see you in the group chat πππ¦
π¦ 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