nilfs_cpfile_get_stat(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ nilfs_cpfile_get_stat ✨

okay so bestie, welcome to the nilfs_cpfile_get_stat page πŸ’… this one lives in the Kernel API Manual (section 9), and it's genuinely one of the shorter reads on the shelf, so grab a boba and let's go πŸ§‹βœ¨


🌸 NAME 🌸

nilfs_cpfile_get_stat β€” get checkpoint statistics πŸ“Š

like, the checkpoint stats. the receipts. the numbers. okay? πŸ’–


πŸ¦‹ SYNOPSIS πŸ¦‹

int nilfs_cpfile_get_stat (struct inode *cpfile , struct nilfs_cpstat
*cpstat );

that's the whole signature, no cap β€” two args in, an int out πŸ”₯


πŸŽ€ ARGUMENTS πŸŽ€

  • cpfile β€” inode of checkpoint file πŸ“ (yes, the checkpoint file, that's the one)
  • cpstat β€” pointer to a structure of checkpoint statistics πŸ“ˆ (this is struct nilfs_cpstat, and it's where the good stuff lands)

πŸ’œ DESCRIPTION πŸ’œ

so nilfs_cpfile_get_stat returns information about checkpoints 🎯

the checkpoint statistics get stored in the location pointed to by cpstat β€” that's it, that's the whole vibe. you hand it the inode and a place to put the stats, it fills that place in. iconic behavior honestly πŸ‘‘


🌈 RETURN 🌈

0 on success πŸŽ‰ β€” or one of the following negative error codes on failure, and yes they're negative, that's the whole point:

  • -EIO β€” I/O error (including metadata corruption) πŸ’€ that metadata was not slaying
  • -ENOMEM β€” insufficient memory available 😭 the kernel ran out of room, tragic

🫢 SEE ALSO 🫢

Kernel file ./fs/nilfs2/cpfile.c β€” the source, the mothership, the birthplace 🌱

and the whole cpfile friend group, in this exact order:


ngl bestie, cpstat is a pointer β€” if you pass it something cursed that isn't a real struct nilfs_cpstat, that's on you, not on the manpage πŸ™ˆ

and that's the tea β˜• this page ships from ./fs/nilfs2, dated October 2026 πŸ—“οΈ β€” it's nilfs_cpfile_get_stat(9) and it ate, periodt πŸ’…βœ¨πŸ¦‹

πŸ“¦ where this page comes from