scan_pool(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ 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 shotgun
  • pebs β€” 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 in pebs
  • max_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 into ai->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