__schedule_ubi_work(9)
π
__schedule_ubi_work(9) β from the Kernel API Manual, bestie β¨
Okay so the manual you're holding is literally the Kernel API Manual and this page is about __schedule_ubi_work(9). Sit down, grab a π, we're scheduling a work. It's giving kernel internals but make it cute.
πΈ NAME πΈ
__schedule_ubi_work β schedule a work. That's it. That's the whole job. Lowkey iconic for how simple it sounds.
π¦ SYNOPSIS π¦
void __schedule_ubi_work (struct ubi_device *ubi , struct ubi_work *wrk
);
Not me copy-pasting this exactly so you don't yell at me π β yes, that spacing is real, yes it returns void, no we are not discussing it.
π ARGUMENTS π
ubiβ the UBI device description object. Like, the whole device's lil profile card. You need it. It's the main character of this call.wrkβ the work to schedule. This is the actual thing you're yeeting onto the list, no cap.
β¨ DESCRIPTION β¨
So here's the tea β: this function adds a work defined by wrk to the tail of the pending works list. Tail, bestie. End of the line. It does not cut, it does not skip, it queues respectfully. π
π¨ BIG CAVEAT, READ THIS TWICE: it can only be used if ubi->work_sem is already held in read mode! Already. Held. Read mode. If you roll up without that, you are not slaying, you are just doing something wrong, fr fr. This is not a suggestion, it's the rule of the function. π
That's genuinely the whole description β no hidden extra options, no secret defaults, nothing. Sometimes a function is just a function. π«Ά
π₯ SEE ALSO π₯
Bestie the cross-reference list is long β like, "she has a whole friend group" long. All of these are kernel-file ./drivers/mtd/ubi/wl.c besties, all (9):
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)β the non-underscored sibling, the extroverted one π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)
Every single one. Not skipping a single β¨girlieβ¨. Go read them, iykyk. π
π SIGN-OFF π
That's the whole page, babe. Source lives under ./drivers/mtd/ubi, and this little masterpiece is dated October 2026 β yes, future-dated, yes she's ahead of her time, periodt. β Go hold that ubi->work_sem in read mode and queue your work at the tail like a well-behaved icon. ππ§π
π¦ 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