add_fastmap(9)
π add_fastmap β kernel API manual, but make it make sense
okay so bestie, this one lives in the add_fastmap(9) section of the Kernel API Manual, and it's genuinely not that deep once you see it. let me put you on. π«Ά
β¨ NAME β¨
add_fastmap β adds a Fastmap related physical eraseblock. that's it. that's the whole vibe. one job, does it, slays. π
β¨ SYNOPSIS β¨
int add_fastmap (struct ubi_attach_info *ai , int pnum , struct
ubi_vid_hdr *vid_hdr , int ec );
like, four things go in, an int comes out. classic. π
β¨ ARGUMENTS β¨
aiβ the attaching information. literally the whole context of the attach we're doing rn. main character energy. πpnumβ the physical eraseblock number that the VID header came from. we're keeping receipts on where it came from fr fr.vid_hdrβ the volume identifier header. yes queen, the VID header. πecβ the erase counter of the physical eraseblock. gotta know how cooked it is. π₯
β¨ DESCRIPTION β¨
so what this function does is: it allocates a struct ubi_ainf_peb object for a Fastmap physical eraseblock pnum, and then it adds it to the fastmap list. periodt. πΈ
and which blocks end up in that list? honestly both kinds, bestie: Fastmap super blocks and Fastmap data blocks β and they can come from either the most recent Fastmap we're attaching from, or from old Fastmaps. and those old ones? yeah, they're gonna get erased. π not us being dramatic, that's just what happens to them.
π SEE ALSO π
the whole friend group, all tagged (9), all from the Kernel file ./drivers/mtd/ubi/attach.c:
find_or_add_av(9)ubi_find_or_add_av(9)ubi_alloc_aeb(9)ubi_free_aeb(9)add_to_list(9)add_corrupted(9)validate_vid_hdr(9)add_volume(9)ubi_compare_lebs(9)ubi_add_to_av(9)ubi_add_av(9)ubi_find_av(9)ubi_remove_av(9)early_erase_peb(9)ubi_early_get_peb(9)check_corruption(9)scan_peb(9)late_analysis(9)destroy_av(9)destroy_ai(9)scan_all(9)scan_fast(9)ubi_attach(9)self_check_ai(9)
no cap, if you're deep in UBI attach code, you're gonna meet every single one of these. it's giving family reunion. π
and that's the page, bestie β brought to you by ./drivers/mtd/ubi, stamped October 2026, living under the Kernel API Manual umbrella, filed under add_fastmap(9). go forth and attach. π¦β¨
π¦ 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