ubifs_destroy_idx_gc(9)
π
ubifs_destroy_idx_gc (9) β the Kernel API Manual page, bestie edition β¨
okay so you found the page, welcome to the <purple>Kernel API Manual</purple> section, we're doing UBIFS internals today and honestly it's giving very niche but very iconic π
π NAME π
ubifs_destroy_idx_gc β destroys the idx_gc list. that's it. that's the whole vibe. lowkey the most self-explanatory name in the entire kernel and I respect it fr fr π
πΈ SYNOPSIS πΈ
void ubifs_destroy_idx_gc (struct ubifs_info *c );
not me pointing out that the signature says void and then the DESCRIPTION starts talking about return values π β I'm just the messenger, bestie, I don't make the rules π
π¦ ARGUMENTS π¦
cβ the UBIFS file-system description object. yeah. that's the one. the whole filesystem, in a struct, right there in your hand π«Ά
β¨ DESCRIPTION β¨
so this function destroys the c->idx_gc list. that's the move. that's what it does π
it gets called when unmounting, which is the key detail here β because of that, locks are not needed, and honestly? good for her. no locking, no stress, no drama, just teardown π§
and per the page: it returns zero in case of success and a negative error code in case of failure. yes, on a void function. yes, we're all just going to sit with that together. no cap. β
π SEE ALSO π
Kernel file ./fs/ubifs/gc.c β go read it, the source is right there, iykyk π
switch_gc_head(9)data_nodes_cmp(9)sort_nodes(9)move_node(9)move_nodes(9)gc_sync_wbufs(9)ubifs_garbage_collect_leb(9)ubifs_garbage_collect(9)ubifs_gc_start_commit(9)ubifs_gc_end_commit(9)ubifs_get_idx_gc_leb(9)
like, the whole gc.c friend group showed up to the function call, obsessed with the attendance π
anyway bestie that's the page π this whole thing lives under ./fs/ubifs, dated October 2026 β mwah, slay, go unmount something responsibly β¨π
π¦ 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