STRUCT UBI_AINF_PEB(9)
β¨ struct ubi_ainf_peb β Kernel API Manual β¨
ok so bestie, welcome to the struct ubi_ainf_peb(9) page π
this is straight out of the Kernel API Manual and honestly it's giving "backstage pass to UBI" energy. let's get into it π«Ά
πΈ NAME πΈ
struct ubi_ainf_peb β attach information about a physical eraseblock. literally that's the whole vibe, it's the little info-bundle for one PEB while attaching π₯
π SYNOPSIS π
struct ubi_ainf_peb {
int ec;
int pnum;
int vol_id;
int lnum;
unsigned int scrub:1;
unsigned int copy_flag:1;
unsigned long long sqnum;
union {
struct rb_node rb;
struct list_head list;
} u;
};
π Members π
here's the whole cast, no cap, every single one π
ecβ the erase counter (it'sUBI_UNKNOWNif it's, y'know, unknown π)pnumβ the physical eraseblock numbervol_idβ the ID of the volume this LEB belongs tolnumβ the logical eraseblock numberscrubβ set if this physical eraseblock needs scrubbing π§copy_flagβ this LEB is a copy (thecopy_flagis set in the VID header of this LEB, iykyk)sqnumβ sequence numberuβ a union of the RB-tree or list links β¨u.rbβ the link in the per-volume RB-tree ofstruct ubi_ainf_pebobjectsu.listβ the link in one of the eraseblock lists
π Description π
okay so the way this works: one object of this type gets allocated for each physical eraseblock when you're attaching an MTD device. main character allocation energy π
β lowkey important note: if this PEB doesn't belong to any LEB / volume, then thevol_idandlnumfields get initialized toUBI_UNKNOWN. fr fr, don't forget that.
π SEE ALSO π
Kernel file ./drivers/mtd/ubi/ubi.h plus the whole friend group π
:
struct ubi_vid_io_buf(9), struct ubi_wl_entry(9), struct ubi_ltree_entry(9), struct ubi_rename_entry(9), struct ubi_fastmap_layout(9), struct ubi_fm_pool(9), struct ubi_eba_leb_desc(9), struct ubi_volume(9), struct ubi_volume_desc(9), struct ubi_debug_info(9), struct ubi_device(9), struct ubi_ainf_volume(9), struct ubi_attach_info(9), struct ubi_work(9), ubi_init_vid_buf(9), ubi_free_vid_buf(9), ubi_get_vid_hdr(9), ubi_ro_mode(9), vol_id2idx(9), idx2vol_id(9), ubi_is_fm_vol(9), ubi_find_fm_block(9)
and that's the page bestie!! π¦ source is ./drivers/mtd/ubi, dated October 2026 β iconic, slay, periodt πβ¨ no thoughts just eraseblocks π
π¦ 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