STRUCT UBI_FM_HDR(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ‘‘ STRUCT UBI_FM_HDR(9) πŸ‘‘

okay bestie, so this page is from the Kernel API Manual and it's literally the receipts for one very specific little thing: struct ubi_fm_hdr, which is the header of the fastmap data set. that's it, that's the whole vibe. she's the opening act, the cover page, the "hi bestie welcome to the fastmap" moment ✨


🌸 SYNOPSIS 🌸

here's her whole entire shape, no notes, copy it exactly:

struct ubi_fm_hdr {
    __be32 magic;
    __be32 free_peb_count;
    __be32 used_peb_count;
    __be32 scrub_peb_count;
    __be32 bad_peb_count;
    __be32 erase_peb_count;
    __be32 vol_count;
    __u8 padding[4];
 };

like yes she's small but she's doing SO much πŸ’…


πŸŽ€ MEMBERS πŸŽ€

  • magic β€” the fastmap header magic number (UBI_FM_HDR_MAGIC). her little signature, her name tag at the party 🫢
  • free_peb_count β€” how many free PEBs this fastmap knows about. the available ones, the chill ones, the "come thru" ones πŸ¦‹
  • used_peb_count β€” how many used PEBs this fastmap knows about. taken. occupied. booked and busy 😭
  • scrub_peb_count β€” how many PEBs are to be scrubbed, according to this fastmap. they need a lil self-care moment πŸ§–
  • bad_peb_count β€” how many bad PEBs this fastmap knows about. not their fault, they're just going through it πŸ’€
  • erase_peb_count β€” the number of bad PEBs which have to be erased. yes, that's what it says, that's exactly what it says, no I'm not paraphrasing πŸ™ˆ
  • vol_count β€” how many UBI volumes this fastmap knows about. the whole friend group, counted πŸ‘‘
ok real talk: every single one of these is a __be32 except the last field, padding, which is __u8 padding[4] β€” that one's just there filling space and honestly same girlie, same πŸŽ€

πŸ’– SEE ALSO πŸ’–

  • Kernel file ./drivers/mtd/ubi/ubi-media.h
  • struct ubi_ec_hdr(9)
  • struct ubi_vid_hdr(9)
  • struct ubi_vtbl_record(9)
  • struct ubi_fm_sb(9)
  • struct ubi_fm_scan_pool(9)
  • struct ubi_fm_ec(9)
  • struct ubi_fm_volhdr(9)
  • struct ubi_fm_eba(9)

like she has a whole extended universe of structs, go read them, they all ate πŸ”₯


k bye bestie, this page lives in ./drivers/mtd/ubi, dated October 2026, and it's filed under struct ubi_fm_hdr(9) β€” that's the whole thing, mwah πŸ’‹πŸŒˆβ­

πŸ“¦ where this page comes from