ubifs_replace_cat(9)
π ubifs_replace_cat β the Kernel API Manual moment
okay so bestie, this is ubifs_replace_cat(9), straight out of the Kernel API Manual and honestly? it's giving "small function, big responsibilities." let's get into it π«Ά
β¨ NAME β¨
ubifs_replace_cat β replace lprops in a category list or heap. periodt. π«
πΈ SYNOPSIS πΈ
void ubifs_replace_cat (struct ubifs_info *c , struct ubifs_lprops
*old_lprops , struct ubifs_lprops *new_lprops );
like yes it's void, it returns nothing, it's not here to give you a status code, it's here to do the thing and leave. main character energy fr. π
π ARGUMENTS π
cβ the UBIFS file-system description object. the whole vibe of the filesystem lives in here, no cap.old_lpropsβ the LEB properties you're replacing. the ones getting swapped out, bestie. πnew_lpropsβ the LEB properties you're replacing them with. the glow-up version. β¨
π¦ DESCRIPTION π¦
okay so context: during commit, sometimes you lowkey have to copy a pnode (see dirty_cow_pnode) β and when you copy a pnode, the lprops that the pnode contains come along with it. literally a package deal. π
and the way that when that happens, the references in category lists and heaps have to be replaced?? yeah. that's the whole entire situation. this function handles it. it does that. that's it, that's the function. slay. π
no like seriously, that's the described job β it replaces those references and nothing else. don't go inventing extra behaviour, iykyk. π§
π₯ SEE ALSO π₯
Kernel file ./fs/ubifs/lprops.c β plus the whole friend group:
get_heap_comp_val(9)move_up_lpt_heap(9)adjust_lpt_heap(9)add_to_lpt_heap(9)remove_from_lpt_heap(9)lpt_heap_replace(9)ubifs_add_to_cat(9)ubifs_remove_from_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)
and that's the page, bestie!! π this one's filed under ./fs/ubifs and stamped October 2026, and yeah we're closing out on ubifs_replace_cat(9) β go read the source, ily, bye ππβ
π¦ 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