STRUCT UBI_EBA_ENTRY(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… struct ubi_eba_entry(9) β€” like, the Kernel API Manual, bestie ✨

Okay so pull up a chair 🫢 we're diving into the Kernel API Manual and today's main character is struct ubi_eba_entry(9). It's tiny. It's iconic. It's giving "small but mighty" and honestly? Obsessed. πŸ’–


✨ NAME ✨

struct ubi_eba_entry β€” the structure that encodes a single LEB -> PEB association πŸ”₯


πŸŽ€ SYNOPSIS πŸŽ€

struct ubi_eba_entry {
    int pnum;
};

That's it. That's the whole vibe. One member. No cap. πŸ’…


πŸ¦‹ Members πŸ¦‹

  • pnum β€” the physical eraseblock number that's attached to the LEB. Like, this is the one piece of info actually living in here, and it's doing its job beautifully. ⭐

🌸 DESCRIPTION 🌸

So this structure is encoding a LEB -> PEB association, periodt. ✨

And here's the lowkey genius part: the LEB number is not stored here at all, because it's literally the index used to access the entries table. Iykyk β€” why store something you already have as an index? That's main character energy right there, no wasted space, no clutter. πŸ’€πŸ‘‘


🌈 SEE ALSO 🌈

Kernel file ./drivers/mtd/ubi/eba.c, plus the whole friend group: struct ubi_eba_table(9), ubi_next_sqnum(9), ubi_get_compat(9), ubi_eba_get_ldesc(9), ubi_eba_create_table(9), ubi_eba_destroy_table(9), ubi_eba_copy_table(9), ubi_eba_replace_table(9), ltree_lookup(9), ltree_add_entry(9), leb_read_lock(9), leb_read_unlock(9), leb_write_lock(9), leb_write_trylock(9), leb_write_unlock(9), ubi_eba_is_mapped(9), ubi_eba_unmap_leb(9), check_mapping(9), ubi_eba_read_leb(9), ubi_eba_read_leb_sg(9), try_recover_peb(9), recover_peb(9), try_write_vid_and_data(9), ubi_eba_write_leb(9), ubi_eba_write_leb_st(9), is_error_sane(9), ubi_eba_copy_leb(9), print_rsvd_warning(9), self_check_eba(9), ubi_eba_init(9). πŸ§šπŸ’œ

Like, go read all of them. They're all slay. 🫢


πŸ’‘ Real talk: every one of those names above is a reference you can actually look up, so don't skip the list β€” it's the whole crew. πŸŽ€

And that's the page, bestie!! πŸ“ Signing off from <pink>./drivers/mtd/ubi</pink> β€” version dated October 2026, filed under struct ubi_eba_entry(9), as always. Mwah. πŸ’…βœ¨

πŸ“¦ where this page comes from