STRUCT NILFS_SEGSUM_INFO(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

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

okay bestie so this is a page straight out of the Kernel API Manual, and honestly? it's giving "receipt for a segment" β€” this struct is the on-memory segment summary for nilfs2, and it holds literally every little number the kernel needs to remember about a chunk of stuff it just wrote. no cap, it's the main character of segment bookkeeping. πŸŽ€


✨ NAME ✨

struct nilfs_segsum_info β€” the on-memory segment summary. that's it, that's the whole vibe. it lives in memory and it summarises segments. periodt. πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

struct nilfs_segsum_info {
    unsigned int            flags;
    unsigned long           nfinfo;
    unsigned long           nblocks;
    unsigned long           nsumblk;
    unsigned long           sumbytes;
    unsigned long           nfileblk;
    u64 seg_seq;
    __u64 cno;
    time64_t ctime;
    sector_t next;
 };

look at that field list. ten members. all of them slaying in their own lane, all of them copied here exactly, not one of them renamed. 🫢


πŸ‘‘ Members πŸ‘‘

here's the tea on every single field, in order, no skipping, we don't do skipping here:

  • flags β€” the flags. yes bestie, that's genuinely all it says, and we're not out here inventing lore. 🚩
  • nfinfo β€” number of file information structures. that's how many file info structs are in the building.
  • nblocks β€” number of blocks included in the partial segment. note the partial β€” this is not the whole segment, it's the partial one, tyvm.
  • nsumblk β€” number of summary blocks. so many summary blocks. an icon.
  • sumbytes β€” the byte count of the segment summary. bytes is bytes and she counts them all.
  • nfileblk β€” the total number of file blocks. total total. 🌈
  • seg_seq β€” the segment sequence number, u64 and proud of it.
  • cno β€” the checkpoint number, a __u64. checkpoints are lowkey the heart of nilfs2 and you will respect them. ⭐
  • ctime β€” creation time, and she's a time64_t. she was born at a moment and she remembers exactly which one. πŸ•°οΈ
  • next β€” the block number of the next full segment, typed sector_t. the sequel. the next chapter. the cliffhanger. πŸ”₯
fr fr, every type in that list matters β€” unsigned int, unsigned long, u64, __u64, time64_t and sector_t are all doing different jobs and none of them are interchangeable. pls don't swap them around, bestie, the compiler will simply pass away. πŸ’€

πŸ’œ SEE ALSO πŸ’œ

  • Kernel file ./fs/nilfs2/segbuf.h β€” that's the header you actually want to go read.
  • struct nilfs_segment_buffer(9) β€” her sister struct. same folder energy. go say hi. 🧚

and that's the whole page bestie!! 🌸 written from ./fs/nilfs2, dated October 2026, and honestly? iconic of that directory to serve this to us. mwah πŸ’‹ ✨ slay responsibly and keep your types exactly as typed πŸ“

πŸ“¦ where this page comes from