STRUCT SIZE_ENTRY(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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:

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