ubi_eba_unmap_leb(9)
β¨ ubi_eba_unmap_leb(9) β¨
okay so this is a page from the Kernel API Manual (yes, the kernel has lore too π
) and it's all about ubi_eba_unmap_leb β that's the "un-map logical eraseblock" girlie. let's get into it π
πΈ SYNOPSIS πΈ
int ubi_eba_unmap_leb (struct ubi_device *ubi , struct ubi_volume *vol ,
int lnum );
literally the whole signature, verbatim, no edits, i don't make the rules π«Ά
π ARGUMENTS π
ubiβ the UBI device description object. like, the whole device's little info card πvolβ the volume description object. the specific volume we're messing with π¦lnumβ the logical eraseblock number. which LEB we're un-mapping, bestie π’
π DESCRIPTION π
k so what this function does: it un-maps the logical eraseblock lnum and schedules the corresponding physical eraseblock for erasure. bye bye mapping, and the PEB gets queued up to be wiped π§Ήβ¨
and the returns? iconic and simple:
- returns zero on success π
- returns a negative error code if it fails π
that's it, that's the whole vibe. no cap.
π SEE ALSO π
the source file lives at ./drivers/mtd/ubi/eba.c β and here's the full friend group, all of them, in order, because i would never do them dirty π«Ά
struct ubi_eba_entry(9), 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), 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, that's the whole squad. read them too, iykyk π
fr fr don't forget: this page ships out of./drivers/mtd/ubi, dated October 2026, and it's all aboutubi_eba_unmap_leb(9). that's the sign-off, mwah πβ¨ stay mapped (or don't, that's literally the function) π¦π
π¦ 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