STRUCT UBI_FM_VOLHDR(9)
π 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 literallyUBI_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β thedata_padvalue 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) exceptvol_typeand 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
- 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