STRUCT UBI_FM_VOLHDR(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’œ struct ubi_fm_volhdr(9) πŸ’œ

okay so this is a page from the Kernel API Manual β€” it's literally the struct ubi_fm_volhdr entry, and bestie, it's giving "small struct, big responsibilities" energy. It's the Fastmap volume header, and its whole job? It identifies the start of an eba table. That's it. That's the vibe. ✨


🌸 NAME 🌸

struct ubi_fm_volhdr β€” the Fastmap volume header, aka the little guy that identifies the start of an eba table. main character energy fr fr πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

struct ubi_fm_volhdr {
    __be32 magic;
    __be32 vol_id;
    __u8 vol_type;
    __u8 padding1[3];
    __be32 data_pad;
    __be32 used_ebs;
    __be32 last_eb_bytes;
    __u8 padding2[8];
 };

no cap, that's the whole struct. the padding1[3] and padding2[8] are just there holding space, okay, they're not in the member list below but they are absolutely in the struct, so don't come for me πŸ’…


πŸ‘‘ Members πŸ‘‘

  • magic β€” the Fastmap volume header magic number, and it's literally UBI_FM_VHDR_MAGIC. iconic. it's how the kernel knows it's looking at one of these πŸ’–
  • vol_id β€” the volume id of the fastmapped volume 🫢
  • vol_type β€” the type of the fastmapped volume ✨
  • data_pad β€” the data_pad value of the fastmapped volume, yes it's the same name, yes that's the bit 🌸
  • used_ebs β€” how many used LEBs live within this volume πŸ“Š
  • last_eb_bytes β€” the number of bytes used in the last LEB, so you know exactly how much of that final one is actually doing something πŸŽ€
lowkey important: these are all __be32 (big-endian) except vol_type and the padding arrays β€” don't go reading them raw on a little-endian box and then act surprised, iykyk πŸ’€

🌈 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_hdr(9)
  • struct ubi_fm_scan_pool(9)
  • struct ubi_fm_ec(9)
  • struct ubi_fm_eba(9)

like, read the whole little family, they all hang out together in ubi-media.h and they're all obsessed with each other 🧚


and that's the page bestie!! this one's from ./drivers/mtd/ubi, dated October 2026, and it's the struct ubi_fm_volhdr(9) entry β€” go forth and fastmap responsibly πŸ’œβ­πŸ”₯

πŸ“¦ where this page comes from