nilfs_cpfile_get_stat(9)
β¨ 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 isstruct 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:
nilfs_cpfile_checkpoint_offset(9)nilfs_cpfile_cp_snapshot_list_offset(9)nilfs_cpfile_ch_snapshot_list_offset(9)nilfs_cpfile_find_checkpoint_block(9)nilfs_cpfile_read_checkpoint(9)nilfs_cpfile_create_checkpoint(9)nilfs_cpfile_finalize_checkpoint(9)nilfs_cpfile_delete_checkpoints(9)nilfs_cpfile_get_cpinfo(9)nilfs_cpfile_delete_checkpoint(9)nilfs_cpfile_is_snapshot(9)nilfs_cpfile_change_cpmode(9)nilfs_cpfile_read(9)
ngl bestie,cpstatis a pointer β if you pass it something cursed that isn't a realstruct 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
- 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