add_size(9)
π 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 herselfznodeβ the znode whose size you're adding. this is the star of the show, the one getting measuredprivβ 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'sadd_size(9)and she ate π β¨πΈ
π¦ 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