ubi_eba_unmap_leb(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ 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 about ubi_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