STRUCT UBI_AINF_VOLUME(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ 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 are struct ubi_ainf_peb objects, 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:


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