STRUCT UBI_LTREE_ENTRY(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ struct ubi_ltree_entry(9) ✨

okay so bestie, welcome to the Kernel API Manual πŸ’– β€” this one's all about struct ubi_ltree_entry, and it's literally the entry in the lock tree. like, the whole point. periodt.


πŸŽ€ NAME πŸŽ€

struct ubi_ltree_entry β€” an entry in the lock tree. that's it, that's the vibe πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

struct ubi_ltree_entry {
    struct rb_node rb;
    int vol_id;
    int lnum;
    int users;
    struct rw_semaphore mutex;
 };

look at her. iconic. no cap 🫢


🌸 Members 🌸

  • rb β€” links RB-tree nodes πŸ”— like this is how she finds her people in the tree, fr fr
  • vol_id β€” volume ID of the locked logical eraseblock πŸ“¦
  • lnum β€” locked logical eraseblock number πŸ”’
  • users β€” how many tasks are using this logical eraseblock or wait for it πŸ‘€ (yes, she's counting. she always knows.)
  • mutex β€” read/write mutex to implement read/write access serialization to the (vol_id, lnum) logical eraseblock πŸ” that's the whole bouncer situation for that one LEB

πŸ’œ Description πŸ’œ

so this data structure is used in the EBA sub-system to implement per-LEB locking ✨

the way it works: when a logical eraseblock is being locked, the corresponding struct ubi_ltree_entry object gets inserted into the lock tree (ubi->ltree) 🌳

see EBA sub-system for details β€” she has lore, iykyk 🧚


🌈 SEE ALSO 🌈

the whole friend group honestly πŸ’€ everybody's linked, everybody's slaying πŸ”₯


ngl this page is short but she ate πŸ‘‘ go read the EBA sub-system stuff if you want the full tea πŸ“

and that's the page bestie!! πŸŽ€ from ./drivers/mtd/ubi, dated October 2026, same manual, same struct ubi_ltree_entry(9) β€” bye mwah πŸ’–πŸ’…πŸ«Ά

πŸ“¦ where this page comes from