STRUCT UBI_AINF_VOLUME(9)
β¨ struct ubi_ainf_volume(9) β¨
okay so this is a page from the Kernel API Manual bestie, and it's all about struct ubi_ainf_volume β literally the attaching information about a volume π
no cap, that's the whole vibe π¦
πΈ NAME πΈ
struct ubi_ainf_volume β attaching information about a volume. that's it, that's the name, she's simple and she knows it β¨
π SYNOPSIS π
struct ubi_ainf_volume {
int vol_id;
int highest_lnum;
int leb_count;
int vol_type;
int used_ebs;
int last_data_size;
int data_pad;
int compat;
struct rb_node rb;
struct rb_root root;
};
look at her. ten whole fields. main character energy π
π«Ά Members π«Ά
okay so let's go through the roster one by one, no skipping, we love a complete list π
vol_idβ the volume ID. her little name tag π·οΈhighest_lnumβ the highest logical eraseblock number in this volume. like the tallest number in the friend group πleb_countβ how many logical eraseblocks are in this volume. the headcount fr fr π’vol_typeβ the volume type. that's it. that's the whole description πused_ebsβ the number of used logical eraseblocks in this volume β and heads up, this one's only for static volumes, so don't come for her if she's blank on dynamic ones πlast_data_sizeβ how much data is in the last logical eraseblock of this volume. and lowkey iconic detail: it's always equivalent to the usable logical eraseblock size in the case of dynamic volumes πβ¨data_padβ how many bytes at the end of this volume's logical eraseblocks are just... not used π« (it's because of volume alignment, iykyk)compatβ the compatibility flags of this volume. flags but make it compatible π©rbβ the link in the volume RB-tree. she's the connector, the social butterfly πrootβ the root of the RB-tree that contains all the eraseblocks belonging to this volume (those arestruct ubi_ainf_pebobjects, fyi π)
π Description π
so when you're attaching an MTD device, one object of this type gets allocated for each volume π that's the whole deal. one volume, one object, matching set, slay π
π₯ SEE ALSO π₯
go read the Kernel file ./drivers/mtd/ubi/ubi.h β it's giving homework but make it cute π and also the whole squad:
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_peb(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)
bestie reminder: no invented facts on this page, every field above is exactly what the kernel docs say π―
and that's the tea β this came out of ./drivers/mtd/ubi, dated October 2026, and it's filed under struct ubi_ainf_volume(9) π¦ mwah, go read the source, ily πβ¨
π¦ 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