scan_pool(9)
β¨ scan_pool(9) β¨
okay so bestie, buckle up π this is scan_pool from the Kernel API Manual β she lives in the UBI world and she's here to scan a pool for changed stuff (aka PEBs that are no longer empty). no cap, that's the whole vibe check of the NAME section. π¦
πΈ SYNOPSIS πΈ
int scan_pool (struct ubi_device *ubi , struct ubi_attach_info *ai ,
__be32 *pebs , int pool_size , unsigned long long *max_sqnum , struct
list_head *free );
literally just look at her signature, she's serving function prototype realness π
π ARGUMENTS π
ubiβ the UBI device object, the main character of this whole situation πaiβ the attach info object, riding shotgunpebsβ an array of all the PEB numbers in the pool that's about to get scanned. all of them. the whole roster π«Άpool_sizeβ size of the pool, i.e. how many entries live inpebsmax_sqnumβ pointer to the maximal sequence number (she's a pointer, bestie, treat her with respect)freeβ list of PEBs that are most likely free (and yes, these go intoai->free, iykyk)
π₯ DESCRIPTION π₯
so here's the tea β: she returns 0 on success. iconic. but if the pool is unusable, she hits you with UBI_BAD_FASTMAP instead π. and if you get something < 0? that's an internal error, ngl, something went wrong in the guts of it π
no soft-launching here β the return value tells you everything straight up:0= slay,UBI_BAD_FASTMAP= pool is unusable,< 0= internal error.
π¦ SEE ALSO π¦
the whole squad, fr fr β check the kernel file ./drivers/mtd/ubi/fastmap.c and then go meet the rest of the friend group:
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), update_vol(9), process_pool_aeb(9), unmap_peb(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) π
kisses from ./drivers/mtd/ubi, dated October 2026, page scan_pool(9) β periodt, go read the source bestie ππ§
π¦ 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