do_sync_erase(9)
π
do_sync_erase β the do_sync_erase(9) page, bestie edition π
okay so you're in the kernel API manual, section 9, and the page is literally called do_sync_erase(9). yes we're doing kernel docs. no i'm not okay about it. let's go β¨
πΈ NAME πΈ
do_sync_erase β run the erase worker synchronously. like, no waiting around, no "i'll get to it later", we're erasing now, bestie. π
π¦ SYNOPSIS π¦
int do_sync_erase (struct ubi_device *ubi , struct ubi_wl_entry *e , int
vol_id , int lnum , int torture );
she returns an int, she takes five things, she's booked and busy. π
π ARGUMENTS π
every single one of these matters, do not skip, i'm serious:
ubiβ the UBI device description object. it's giving "the whole world this function lives in" energy. πeβ the WL entry of the physical eraseblock to erase. yes, that PEB. the main character of this call. π₯vol_idβ the volume ID that last used this PEB. remembering who had it last, we love continuity. πlnumβ the last used logical eraseblock number for the PEB. keeping receipts, fr fr. πtortureβ if the physical eraseblock has to be tortured. and yes, it's literally calledtortureand i'm obsessed with that naming choice. π no cap.
ngl, torture is not a fun little bonus feature β it's a real flag with real consequences for that physical eraseblock. treat it with respect. π
π§ SEE ALSO π§
the whole squad, alphabetically-adjacent-ish, in one giant group chat. i love a lore dump:
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)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)
also, Γ propos of nothing π, the kernel file this all lives in is ./drivers/mtd/ubi/wl.c β that's the spot, that's the source. iykyk. π
and that's the whole page, bestie, you ate that. the source is the kernel file ./drivers/mtd/ubi, dated October 2026 β so yeah, future vibes, very main character of it. until next time, mwah π«Άππ
π¦ 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