STRUCT SIZE_ENTRY(9)
π struct size_entry(9) π
okay so bestie, welcome to the Kernel API Manual β yes, that Kernel API Manual β and today's main character is a lil struct that literally exists so your inode sizes can be recovered after things go sideways. no cap. π«Ά
β¨ NAME β¨
struct size_entry β inode size information for recovery. that's it, that's the vibe. π
πΈ SYNOPSIS πΈ
struct size_entry {
struct rb_node rb;
ino_t inum;
loff_t i_size;
loff_t d_size;
int exists;
struct inode *inode;
};
look at her. iconic. six fields. zero notes. β¨
π Members π
rbβ her link in the RB-tree of sizes. yes bestie, she's in a red-black tree, it's giving main character energy. πinumβ the inode number. literally who she is. πi_sizeβ the size on inode. the size stored right there on the inode itself. π¦d_sizeβ the maximum size based on data nodes. highkey a different number, lowkey important. πexistsβ indicates whether the inode exists. vibe check: does she exist or not. βinodeβ the inode if it's pinned in memory awaiting rw mode to fix it. not just any inode β one that's pinned and waiting. she's on hold until rw mode comes through. π
π SEE ALSO π
the Kernel file ./fs/ubifs/recovery.c is where the whole friend group lives, and here's the whole squad, no one left out, periodt:
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)add_ino(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 ate and left no crumbs. π₯
bestie, this page came straight out of ./fs/ubifs and it's dated October 2026 β so yeah, mark your calendar, she's from the future. πβ¨ mwah, go fix those inode sizes. π
π¦ 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