STRUCT NILFS_ROOT(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– struct nilfs_root(9) πŸ’–

okay so this is a page from the Kernel API Manual bestie, and we're talking about struct nilfs_root β€” the nilfs root object itself, no cap. it's giving "the main character struct" energy for real 🌸


✨ NAME ✨

struct nilfs_root β€” the nilfs root object πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

struct nilfs_root {
    __u64 cno;
    struct rb_node rb_node;
    refcount_t count;
    struct the_nilfs *nilfs;
    struct inode *ifile;
    atomic64_t inodes_count;
    atomic64_t blocks_count;
    struct kobject snapshot_kobj;
    struct completion snapshot_kobj_unregister;
 };

literally the whole struct, copy-pasted exactly, don't @ me πŸ’…


πŸ‘‘ Members πŸ‘‘

okay so here's the breakdown of every single field, and yes we're doing all of them 🫢

  • cno β€” the checkpoint number ✨
  • rb_node β€” the red-black tree node 🌈
  • count β€” the refcount of this structure. it's counting how many people are holding onto it, very "how many besties are in the group chat" of it πŸ’€
  • nilfs β€” the nilfs object 🌸
  • ifile β€” the inode file πŸ¦‹
  • inodes_count β€” the number of inodes, and it's an atomic64_t so she's thread-safe and thriving ⭐
  • blocks_count β€” the number of blocks, also atomic64_t, also iconic πŸ’œ
  • snapshot_kobj β€” lives at /sys/fs/<nilfs>/<device>/mounted_snapshots/<snapshot>, which is lowkey a whole address, honestly obsessed πŸŽ€
  • snapshot_kobj_unregister β€” the completion state for the kernel object 🧚
not me listing every single member because the rule is we keep ALL the details and we do not skip the "boring" ones, periodt πŸ’…

πŸ”₯ SEE ALSO πŸ”₯

  • Kernel file ./fs/nilfs2/the_nilfs.h
  • struct the_nilfs(9)

go read those too, iykyk πŸ‘‘


and that's the whole vibe check bestie πŸ’– this page came from ./fs/nilfs2 and it's dated October 2026 β€” slay, see you in the kernel source, mwah πŸŽ€βœ¨


πŸ“¦ where this page comes from