lpt_heap_replace(9)
π
lpt_heap_replace β like, the lpt_heap_replace(9) page, bestie
okay so this is straight out of the Kernel API Manual and it's all about swapping lprops inside a category heap. sounds niche? it IS niche. but it's also kind of iconic if you're into UBIFS internals. π¦
β¨ NAME β¨
lpt_heap_replace β replace lprops in a category heap. that's it. that's the whole name. short, sweet, slays.
πΈ SYNOPSIS πΈ
void lpt_heap_replace (struct ubifs_info *c , struct ubifs_lprops
*new_lprops , int cat );
literally three args. no defaults, no funny business. void return, so nothing comes back β it just does the thing. π
π ARGUMENTS π
cβ the UBIFS file-system description object. your whole filesystem's little ID card, basically. main character energy fr.new_lpropsβ LEB properties with which to replace. i.e. the new lprops stepping in to take over. glow-up moment πcatβ LEB category. just tell it which category heap we're vibing in.
π₯ DESCRIPTION π₯
so here's the lore: during commit it is sometimes necessary to copy a pnode β see dirty_cow_pnode β and the lprops that the pnode contains.
and like⦠the moment that happens, all the references in the category heaps that point at those old lprops? yeah they're stale. they must be updated to point to the new lprops instead. cannot stress this enough, no cap.
lpt_heap_replace is the function that does that. it's giving cleanup crew, it's giving "i'll handle it", it's the friend who fixes the group chat plan when everyone's confused. π«Ά
ngl, if those heap references didn't get updated, things would be pointing at the wrong lprops and that's a whole situation. so this function isn't optional vibes β it's load-bearing.
π SEE ALSO π
everything else living in the Kernel file ./fs/ubifs/lprops.c β a genuinely iconic lineup, honestly:
get_heap_comp_val(9)move_up_lpt_heap(9)adjust_lpt_heap(9)add_to_lpt_heap(9)remove_from_lpt_heap(9)ubifs_add_to_cat(9)ubifs_remove_from_cat(9)ubifs_replace_cat(9)ubifs_ensure_cat(9)ubifs_categorize_lprops(9)change_category(9)ubifs_calc_dark(9)is_lprops_dirty(9)ubifs_change_lp(9)ubifs_get_lp_stats(9)ubifs_change_one_lp(9)ubifs_update_one_lp(9)ubifs_read_one_lp(9)ubifs_fast_find_free(9)ubifs_fast_find_empty(9)ubifs_fast_find_freeable(9)ubifs_fast_find_frdi_idx(9)dbg_check_cats(9)scan_check_cb(9)dbg_check_lprops(9)
whole friend group. go say hi. π
okay that's the whole page, you ate it, you understood it, i'm obsessed π
this little drop came to you from ./fs/ubifs, dated October 2026, and it's the lpt_heap_replace(9) page saying byeee πβπ¦
π¦ 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