take_gc_lnum(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

take_gc_lnum(9) πŸŽ€

okay so bestie, welcome to the page for take_gc_lnum(9) from the Kernel API Manual β€” manual name folded in near the top, and yes it's serving ✨.

✨ NAME ✨

take_gc_lnum β€” reserve GC LEB. periodt πŸ’…

🌸 SYNOPSIS 🌸

int take_gc_lnum (struct ubifs_info *c );

🫢 ARGUMENTS 🫢

  • c β€” UBIFS file-system description object. that's the one and only arg, bestie ✨

πŸ”₯ DESCRIPTION πŸ”₯

okay so here's the main character move: take_gc_lnum ensures that the LEB reserved for garbage collection is marked as "taken" in lprops. literally its whole job, and it ate πŸ’….

We also have to set free space to LEB size and dirty space to zero, because lprops may contain out-of-date information if the file-system was un-mounted before it has been committed. yes bestie, stale lprops info is the villain of this episode 😭.

This function returns zero in case of success and a negative error code in case of failure. zero = slay, negative error = the plot twist πŸ™ˆ.

πŸ¦‹ SEE ALSO πŸ¦‹

Kernel file ./fs/ubifs/super.c, plus the whole see-also friend group:


xoxo, your kernel bestie πŸ’– β€” source/version ./fs/ubifs, dated October 2026, signing off for take_gc_lnum(9) 🌈.

πŸ“¦ where this page comes from