lpt_gc_lnum(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 NAME 🌸

lpt_gc_lnum β€” garbage collect a LPT LEB. This page is lpt_gc_lnum(9) from the Kernel API Manual, so hiiii bestie, welcome to the LPT cleanup committee. πŸ’…

πŸ’– SYNOPSIS πŸ’–

Here’s the exact signature, no edits, no cap:

int lpt_gc_lnum (struct ubifs_info *c , int lnum );

πŸŽ€ ARGUMENTS πŸŽ€

  • c β€” UBIFS file-system description object. It’s the context baddie for this whole operation. 🫢
  • lnum β€” LEB number to garbage collect. This is the LEB getting the ✨dirty✨ treatment.

🌸 DESCRIPTION 🌸

okay so LPT garbage collection is used only for the "big" LPT model β€” the vibe check is c->big_lpt == 1, periodt. No big-LPT energy, no GC. πŸ’…

Only the β€œbig” LPT model gets this treatment β€” the check is literally c->big_lpt == 1.

Garbage collection simply involves marking all the nodes in the LEB being garbage-collected as dirty. That’s it β€” the nodes get marked dirty, no extra plot twist. 🫧

The dirty nodes are written next commit, after which the LEB is free to be reused. So after the next commit, that LEB can be reused; it’s giving β€œrecycled and thriving.” ♻️

Return vibe check: this function returns 0 on success and a negative error code on failure. If it comes back negative, that’s a fail, bestie. 😭

πŸ¦‹ SEE ALSO πŸ¦‹

Kernel file ./fs/ubifs/lpt_commit.c is the source-file main character, and it brought the whole friend group:

xoxo from ./fs/ubifs, October 2026, on lpt_gc_lnum(9) β€” slay and goodbye! πŸ’–βœ¨

πŸ“¦ where this page comes from