add_inode(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 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