move_node(9)
π« move_node(9) β the Kernel API Manual glow-up π«
okay so bestie, we're in the Kernel API Manual today and the star of the show is move_node, a little function from the UBIFS world that literally just... moves a node. iconic behavior honestly. let's get into it π
β¨ NAME β¨
move_node β move a node. that's it. that's the whole vibe. π¦
πΈ SYNOPSIS πΈ
int move_node (struct ubifs_info *c , struct ubifs_scan_leb *sleb ,
struct ubifs_scan_node *snod , struct ubifs_wbuf *wbuf );
like, four arguments, one int coming back at you. she's compact, she's efficient, she's giving main character energy π
π ARGUMENTS π
cβ the UBIFS file-system description object. yes bestie, the whole filesystem's little biography. π«Άslebβ describes the LEB to move nodes from. that's your starting point, your origin story. β¨snodβ the mode to move. (the manual says "mode", we're keeping it exactly as the manual says it, no cap. π)wbufβ write-buffer to move node to. destination era. π
π₯ DESCRIPTION π₯
okay so here's the tea β β this function moves node snod to wbuf, changes TNC correspondingly, and destroys snod. like, not "gently retires", not "archives" β destroys. gone. π
returns zero in case of success and a negative error code in case of failure. so like, 0 = slay, negative = not slay. simple as that fr fr π
bestie please note: snod does NOT survive this function. do not go looking for it afterward. it's giving "she left the group chat." π
π SEE ALSO π
Kernel file ./fs/ubifs/gc.c plus this whole squad right here β go read them, they're all linked up iykyk:
switch_gc_head(9)data_nodes_cmp(9)sort_nodes(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_destroy_idx_gc(9)ubifs_get_idx_gc_leb(9)
π sign-off π
this lil page lives in ./fs/ubifs, dated October 2026, and it's presented to you by the Kernel API Manual. go forth and move those nodes, bestie β responsibly, and remember: 0 on success, negative on failure, and snod does not come back. ππ§β
π¦ 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