add_inode(9)
πΈ add_inode(9) β a little Kernel API Manual moment πΈ
okay bestie, welcome to the Kernel API Manual page for add_inode and honestly? it's giving "small function, big job" energy. she's a helper, she's important, she's about to file some inode info away in an RB-tree like the organized icon she is π
β¨ NAME β¨
add_inode β add inode information to RB-tree of inodes.
like, that's literally her whole thing. she adds inode info to the RB-tree of inodes. no cap. π
π¦ SYNOPSIS π¦
struct fsck_inode * add_inode (struct ubifs_info *c , struct fsck_data
*fsckd , struct ubifs_ino_node *ino );
look at her signature, so clean, so structured. three args, one return type, zero drama (well, except the negative error codes, we'll get there π).
π ARGUMENTS π
cβ UBIFS file-system description object. yes queen, tell us about the filesystem.fsckdβ FS checking information. the ~vibes~ of the fsck, basically. the data she needs to do her job.inoβ raw UBIFS inode to add. raw as in unprocessed, not as in "raw and unfiltered" β though honestly both kinda apply π«Ά
π DESCRIPTION π
so here's the tea β β add_inode is a helper function for check_leaf, and what she does is she adds information about inode ino to the RB-tree of inodes. that's it, that's the whole job, but she does it beautifully.
and the return situation? bestie, listen closely:
- on success she returns an inode information pointer π
- on failure she returns a negative error code π
so like, always check your return value, okay? don't be out here assuming things. that's not the vibe. β
π₯ SEE ALSO π₯
the whole friend group, fr fr β these are all in the kernel file ./fs/ubifs/debug.c:
ubifs_dump_index(9), dbg_save_space_info(9), dbg_check_space_info(9), dbg_check_synced_i_size(9), dbg_check_key_order(9), dbg_check_znode(9), dbg_check_tnc(9), dbg_walk_index(9), add_size(9), dbg_check_idx_size(9), struct fsck_inode(9), struct fsck_data(9), search_inode(9), read_add_inode(9), check_leaf(9), free_inodes(9), check_inodes(9), dbg_check_filesystem(9), dbg_check_data_nodes_order(9), dbg_check_nondata_nodes_order(9), provide_user_output(9), interpret_user_input(9), dbg_debugfs_init_fs(9), dbg_debugfs_exit_fs(9), dbg_debugfs_init(9), dbg_debugfs_exit(9), ubifs_debugging_init(9), ubifs_debugging_exit(9)
go read them all, bestie, they're iconic, every single one π
and that's the page!! mwah π she lives in ./fs/ubifs, and this little love letter to add_inode(9) is dated October 2026 β so mark your calendar, screenshot it, put it on your fridge π§π periodt.
π¦ 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