add_size(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– add_size β€” a Kernel API Manual moment (section 9, bestie) πŸ’–

okay so real talk, this is from the Kernel API Manual, and it's the add_size(9) page β€” yes section 9, we love a specific queen. Anyway. she's small, she's a helper, she literally just adds a number to another number. and honestly? iconic for that.


✨ NAME ✨

add_size β€” adds the znode size into a partially calculated index size. that's it, that's the whole job πŸŽ€


🌸 SYNOPSIS 🌸

int add_size (struct ubifs_info *c , struct ubifs_znode *znode , void
*priv );

she takes three things and returns an int. no cap.


πŸ¦‹ ARGUMENTS πŸ¦‹

  • c β€” the UBIFS file-system description object πŸ’… the context, the whole vibe, the file system herself
  • znode β€” the znode whose size you're adding. this is the star of the show, the one getting measured
  • priv β€” the partially calculated index size 🌈 aka where the number goes

πŸ”₯ DESCRIPTION πŸ”₯

okay so here's the tea. add_size is a helper function for dbg_check_idx_size, and she gets called for every single indexing node, one by one, no skips, no shortcuts. each time she shows up, she takes that node's size and adds it to the long long variable that priv points at. that's the whole bit. the partially calculated index size just keeps growing, node by node, like a group chat that never sleeps 😭

so when priv walks in, it's partially calculated β€” and by the time she's done with everything, it's more calculated. growth. character development. we love to see it πŸ’–


πŸ‘‘ SEE ALSO πŸ‘‘

these are all the besties in the same file β€” 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), dbg_check_idx_size(9), struct fsck_inode(9), struct fsck_data(9), add_inode(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).

that's the whole squad, fr fr. go say hi 🫢


🧚 a little sign-off from me to you: this page lives in ./fs/ubifs, and the version stamp on it is October 2026. so she's fresh, she's dated, she's add_size(9) and she ate πŸ’…βœ¨πŸŒΈ
πŸ“¦ where this page comes from