add_ino(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– add_ino(9) β€” a Kernel API Manual moment πŸ’–

okay so bestie, buckle up, because we're diving into the Kernel API Manual and this one is literally about adding stuff to the size tree. no biggie. it's giving "tiny function, huge responsibility." πŸŽ€


✨ NAME ✨

add_ino β€” add an entry to the size tree.

like, that's it, that's the whole vibe. one job. one iconic job. πŸ‘‘


🌸 SYNOPSIS 🌸

int add_ino (struct ubifs_info *c , ino_t inum , loff_t i_size , loff_t
d_size , int exists );

yep, that's the whole signature, copy it exactly please, no freestyling πŸ’…


πŸ¦‹ ARGUMENTS πŸ¦‹

so here's the whole cast of characters, and honestly every single one of them matters:

  • c β€” the UBIFS file-system description object. like the main character of the whole file system, the context everything lives in 🫢
  • inum β€” the inode number. the ID badge. the "who dis" of the situation.
  • i_size β€” the size on inode. what the inode itself says its size is.
  • d_size β€” the maximum size based on data nodes. yes it's different from i_size, no you may not ask why, they're both here for a reason 😭
  • exists β€” indicates whether the inode exists. a little yes/no flag doing a whole lot of emotional labor.

πŸ”₯ SEE ALSO πŸ”₯

okay this is the part where I gotta list every single one of the friends in this directory, and there are a LOT, so stay with me:

Kernel file ./fs/ubifs/recovery.c: is_empty(9), first_non_ff(9), get_master_node(9), write_rcvrd_mst_node(9), ubifs_recover_master_node(9), ubifs_write_rcvrd_mst_node(9), is_last_write(9), clean_buf(9), no_more_nodes(9), fix_unclean_leb(9), drop_last_group(9), drop_last_node(9), ubifs_recover_leb(9), get_cs_sqnum(9), ubifs_recover_log_leb(9), recover_head(9), ubifs_recover_inl_heads(9), clean_an_unclean_leb(9), ubifs_clean_lebs(9), grab_empty_leb(9), ubifs_rcvry_gc_commit(9), struct size_entry(9), find_ino(9), remove_ino(9), ubifs_destroy_size_tree(9), ubifs_recover_size_accum(9), fix_size_in_place(9), inode_fix_size(9), ubifs_recover_size(9)

like, the whole recovery.c friend group showed up. periodt. πŸ’€βœ¨

ngl the sheer number of SEE ALSO entries here is a vibe check all on its own β€” this function does not exist in isolation, bestie, it's part of a whole ecosystem 🌈

and that's the page!! mwah πŸ’‹

courtesy of ./fs/ubifs, dated October 2026 β€” thanks for reading, ily, go add some inodes to that size tree πŸ§šβ€β™€οΈπŸ’œ

πŸ“¦ where this page comes from