make_pnode_dirty(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

make_pnode_dirty(9) πŸ’…

okay bestie, welcome to this page from the Kernel API Manual β€” we're talking about make_pnode_dirty, and the vibe is exactly: "find a pnode and, if found, make it dirty." ✨ no cap.

πŸ’– NAME πŸ’–

make_pnode_dirty β€” find a pnode and, if found, make it dirty.

πŸŽ€ SYNOPSIS πŸŽ€

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

πŸ¦‹ ARGUMENTS πŸ¦‹

  • c β€” the UBIFS file-system description object, aka the main-character struct.
  • node_num β€” the pnode number of the pnode we're making dirty.
  • lnum β€” the LEB number where that pnode was written.
  • offs β€” the offset where that pnode was written.

✨ DESCRIPTION ✨

So this function is used by LPT garbage collection. LPT garbage collection is only for the "big" LPT model, meaning c->big_lpt == 1. Garbage collection simply involves marking all the nodes in the LEB being garbage-collected as dirty. The dirty nodes are written next commit, and after that the LEB is free to be reused. πŸŒ€

It returns 0 on success and a negative error code on failure. Zero is the slay outcome; negative error code is the not-slay outcome. 😭

bestie, keep those return values straight β€” success is 0, failure is a negative error code.

🌈 SEE ALSO 🌈

The kernel file is ./fs/ubifs/lpt_commit.c, and the whole SEE ALSO squad is here, every single one:


byeee from source/version ./fs/ubifs, dated October 2026, page make_pnode_dirty(9) 🫢✨

πŸ“¦ where this page comes from