take_gc_lnum(9)
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:
validate_inode(9)init_constants_early(9)bud_wbuf_callback(9)alloc_wbufs(9)free_wbufs(9)free_orphans(9)free_buds(9)check_volume_empty(9)ubifs_parse_param(9)destroy_journal(9)bu_init(9)check_free_space(9)mount_ubifs(9)ubifs_umount(9)ubifs_remount_rw(9)ubifs_remount_ro(9)open_ubi(9)
xoxo, your kernel bestie π β source/version ./fs/ubifs, dated October 2026, signing off for take_gc_lnum(9) π.
π¦ 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