gc_sync_wbufs(9)
π
gc_sync_wbufs β from the gc_sync_wbufs(9) kernel API manual, bestie
okay so picture this: it's a kernel API manual page, it's section 9, and it lives in ./fs/ubifs. and the star of the show is gc_sync_wbufs. buckle up π
β¨ NAME β¨
gc_sync_wbufs β sync write-buffers for GC. that's it, that's the whole vibe. literally just syncing write-buffers for GC π¦
πΈ SYNOPSIS πΈ
int gc_sync_wbufs (struct ubifs_info *c );
π«Ά ARGUMENTS π«Ά
cβ the UBIFS file-system description object. that's your girl, she's carrying all the info β¨
π DESCRIPTION π
okay so here's the situation, and it's lowkey serious. we must guarantee that obsoleting nodes are on flash. that's non-negotiable. but unfortunately π they may be hanging out in a write-buffer instead. rude of them honestly.
like, picture a node getting written to a write-buffer, and it's obsoleting another node that lives in a LEB that's getting GC'd. the way that's a whole problem is: if that LEB gets erased before the write-buffer is sync'd, and then there's an unclean unmount? then an existing node is just... lost. gone. not the vibe. π
so to avoid alllll of that drama, we sync all write-buffers. every single one. no cap π
this function returns 0 on success, or a negative error code on failure. simple as that, periodt π
bestie the stakes are real here β lost nodes after an unclean unmount are not it. sync first, always. π₯
π SEE ALSO π
kernel file ./fs/ubifs/gc.c, plus all these iconic friends:
switch_gc_head(9)data_nodes_cmp(9)sort_nodes(9)move_node(9)move_nodes(9)ubifs_garbage_collect_leb(9)ubifs_garbage_collect(9)ubifs_gc_start_commit(9)ubifs_gc_end_commit(9)ubifs_destroy_idx_gc(9)ubifs_get_idx_gc_leb(9)
β¨ okay that's the whole page, mwah π this cutie came from ./fs/ubifs and it's dated October 2026 β go off, calendar icon ποΈπ
π¦ 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