make_node_dirty(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… make_node_dirty(9) β€” like, the Kernel API Manual era πŸŽ€

okay so bestie, welcome to make_node_dirty(9), straight out of the Kernel API Manual and honestly? it's giving "small function, big responsibilities" ✨


✨ NAME ✨

make_node_dirty β€” make node dirty. that's it. that's the whole vibe. it marks a node dirty πŸ’–


🌸 SYNOPSIS 🌸

int make_node_dirty (struct ubifs_info *c , int node_type , int node_num
, int lnum , int offs );

literally five args, no cap. returns an int, we love a return value πŸ‘‘


πŸ¦‹ ARGUMENTS πŸ¦‹

  • c β€” the UBIFS file-system description object. your main character struct, fr fr 🫢
  • node_type β€” LPT node type. it's giving classification πŸ’…
  • node_num β€” the node number πŸŽ€
  • lnum β€” LEB number where node was written πŸ“
  • offs β€” offset where node was written πŸ“

πŸ”₯ DESCRIPTION πŸ”₯

so this function is used by LPT garbage collection. and LPT garbage collection? bestie, it's exclusive, it's only used for the "big" LPT model β€” meaning c->big_lpt == 1 ⭐ like, if that's not your model, this is not your party πŸ™ˆ

and what does garbage collection actually do here? honestly it's so simple it ate: it just marks all the nodes in the LEB being garbage-collected as dirty πŸ’€ that's the whole thing. no drama, no fuss, just dirty-marking.

then the dirty nodes get written next commit, and after that the LEB is free to be reused. iconic recycling behavior, we love to see it 🌈

This function returns 0 on success and a negative error code on failure. so like, check your return value, bestie, don't leave me hanging 😭


πŸ’œ SEE ALSO πŸ’œ

Kernel file ./fs/ubifs/lpt_commit.c β€” and the whole friend group, in order, no skips:

first_dirty_cnode(9), next_dirty_cnode(9), get_cnodes_to_commit(9), upd_ltab(9), alloc_lpt_leb(9), layout_cnodes(9), realloc_lpt_leb(9), write_cnodes(9), next_pnode_to_dirty(9), add_pnode_dirt(9), do_make_pnode_dirty(9), make_tree_dirty(9), need_write_all(9), lpt_tgc_start(9), lpt_tgc_end(9), populate_lsave(9), nnode_lookup(9), make_nnode_dirty(9), make_pnode_dirty(9), make_ltab_dirty(9), make_lsave_dirty(9), get_lpt_node_len(9), get_pad_len(9), get_lpt_node_type(9), is_a_node(9), lpt_gc_lnum(9), lpt_gc(9), ubifs_lpt_start_commit(9), free_obsolete_cnodes(9), ubifs_lpt_end_commit(9), ubifs_lpt_post_commit(9), first_nnode(9), next_nnode(9), ubifs_lpt_free(9), dbg_is_all_ff(9), dbg_is_nnode_dirty(9), dbg_is_pnode_dirty(9), dbg_is_ltab_dirty(9), dbg_is_lsave_dirty(9), dbg_is_node_dirty(9), dbg_check_ltab_lnum(9), dbg_check_ltab(9), dbg_chk_lpt_free_spc(9), dbg_chk_lpt_sz(9), dump_lpt_leb(9), ubifs_dump_lpt_lebs(9), dbg_populate_lsave(9)


and that's the page, bestie πŸ“ this one came from ./fs/ubifs, dated October 2026 β€” signed, sealed, and slayed πŸ§šπŸ’– periodt.

πŸ“¦ where this page comes from