STRUCT UBI_LTREE_ENTRY(9)
β¨ 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 frvol_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 π
- Kernel file
./drivers/mtd/ubi/ubi.h struct ubi_vid_io_buf(9)struct ubi_wl_entry(9)struct ubi_rename_entry(9)struct ubi_fastmap_layout(9)struct ubi_fm_pool(9)struct ubi_eba_leb_desc(9)struct ubi_volume(9)struct ubi_volume_desc(9)struct ubi_debug_info(9)struct ubi_device(9)struct ubi_ainf_peb(9)struct ubi_ainf_volume(9)struct ubi_attach_info(9)struct ubi_work(9)ubi_init_vid_buf(9)ubi_free_vid_buf(9)ubi_get_vid_hdr(9)ubi_ro_mode(9)vol_id2idx(9)idx2vol_id(9)ubi_is_fm_vol(9)ubi_find_fm_block(9)
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
- 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