update_vol(9)
β¨ update_vol(9) β¨
okay so this is a page from the Kernel API Manual β yes, the actual kernel manual, and yes, we're gonna read it together bestie, don't panic π
πΈ NAME πΈ
update_vol β inserts or updates a LEB which was found a pool.
(not a typo, that's literally what it says: "found a pool" π«Ά we love a slightly cursed sentence, it's giving legacy comment energy)
π SYNOPSIS π
int update_vol (struct ubi_device *ubi , struct ubi_attach_info *ai ,
struct ubi_ainf_volume *av , struct ubi_vid_hdr *new_vh , struct
ubi_ainf_peb *new_aeb );
five arguments, all structs, all pointers, all here to do exactly one job π
π¦ ARGUMENTS π¦
ubiβ the UBI device object. the main character of this whole subsystem ngl.aiβ attach info object. the receipts from the attach, basically.avβ the volume this LEB belongs to. gotta know where it lives πnew_vhβ the volume header derived fromnew_aeb. it's the header's origin story.new_aebβ the AEB to be examined. yes, examined. put it under the microscope π¬
π₯ DESCRIPTION π₯
Returns 0 on success. < 0 indicates an internal error.
that's it. that's the whole description. short, sweet, and honestly iconic for it π no cap, sometimes a function's entire personality is its return value and we respect that.
heads up bestie: if you get a negative back, that's an internal error β not a you problem, an internals problem. still not a slay, but at least you know where to look π«Ά
π SEE ALSO π
Kernel file ./drivers/mtd/ubi/fastmap.c β plus the whole fastmap friend group, all listed right here so you never have to go looking:
init_seen(9)free_seen(9)set_seen(9)self_check_seen(9)ubi_calc_fm_size(9)new_fm_vbuf(9)add_aeb(9)add_vol(9)assign_aeb_to_av(9)process_pool_aeb(9)unmap_peb(9)scan_pool(9)count_fastmap_pebs(9)ubi_attach_fastmap(9)find_fm_anchor(9)ubi_scan_fastmap(9)ubi_write_fastmap(9)invalidate_fastmap(9)return_fm_pebs(9)ubi_update_fastmap(9)
twenty of them. twenty!! the fastmap.c cast is huge and every single one of them got an invite to the see-also list π§β¨
and that's the page!! ./drivers/mtd/ubi, October 2026, straight from the Kernel API Manual β go forth and update those volumes, bestie, you've got this ππ
π¦ 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