ubi_eba_get_ldesc(9)
π ubi_eba_get_ldesc(9) β like, the whole vibe of a LEB, bestie
okay so this is a page straight out of the Kernel API Manual β the function is ubi_eba_get_ldesc(9) and honestly? she's a little baby function but she's doing her best and we support her π«Ά
β¨ NAME β¨
ubi_eba_get_ldesc β get information about a LEB π
(LEB = logical eraseblock, iykyk. she's the logical one, the main character of the eraseblock world π)
πΈ SYNOPSIS πΈ
void ubi_eba_get_ldesc (struct ubi_volume *vol , int lnum , struct
ubi_eba_leb_desc *ldesc );
no cap, that's the whole signature. void return, three args, she takes them and she fills them in. periodt β¨
π ARGUMENTS π
volβ the volume description object. literally which volume we're snooping on, bestie πΈlnumβ the logical eraseblock number. like the index, the address in logical-land, the where πldescβ the LEB descriptor to fill. she hands you this empty little container and you fill it with knowledge π
ngl, ldesc is an out-param vibes situation β you give it to the function, the function stuffs info into it. fill it up, queen π
π¦ DESCRIPTION π¦
okay so the whole point: this is how you query information about a specific LEB π΅οΈββοΈβ¨
right now? she's lowkey only returning the physical position of the LEB. that's it. that's the tea β but here's the thing β she will be extended to provide more information. the way that she's future-proofed π she's growing, she's evolving, she's in her expansion era π
so like, don't get too attached to the current output set β it's giving "starter pack" energy. today it's just the physical position, tomorrow? who knows π
π₯ SEE ALSO π₯
bestie the SEE ALSO section is stacked. it's giving entire ecosystem. buckle up, we're listing all of them because everyone deserves their moment π β¨
The file she lives in:
- Kernel file
./drivers/mtd/ubi/eba.c
The structs & table crew:
struct ubi_eba_entry(9)struct ubi_eba_table(9)ubi_eba_create_table(9)ubi_eba_destroy_table(9)ubi_eba_copy_table(9)ubi_eba_replace_table(9)
Sequence numbers & compat:
The ltree legends:
All the locking girlies (guard your data fr fr):
Mapping & unmapping:
Reading & writing LEBs:
Recovery & error handling (the dramatic part):
try_recover_peb(9)recover_peb(9)try_write_vid_and_data(9)is_error_sane(9)print_rsvd_warning(9)self_check_eba(9)
Copying & init:
ok so real talk: this is kernel API territory π«£ misusing it is not a cute look. read the source, respect the locks, and remember she's still growing into her full feature set. no cap π
and that's the page!! β¨π¦ source vibes live in ./drivers/mtd/ubi, this whole thing is dated October 2026, and it's from your fave Kernel API Manual β go forth and query those LEBs, bestie, you're gonna slay πππ
π¦ 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