nilfs_cpfile...d_checkpoint(9)
π« NAME π«
nilfs_cpfile_read_checkpoint β bestie, this is the one that reads a checkpoint entry out of cpfile β¨
okay so real quick before we dive in: this page lives in the Kernel API Manual, and the page you're looking at is nilfs_cpfile...d_checkpoint(9) (yes the title got a little truncated by the man-page gremlins, it's fine, we move π
).
π SYNOPSIS π
int nilfs_cpfile_read_checkpoint (struct inode *cpfile , __u64 cno ,
struct nilfs_root *root , struct inode *ifile );
Like, that's the whole vibe. Four args, one int back. No cap. π¦
πΈ ARGUMENTS πΈ
cpfileβ the checkpoint file inode. This is the cpfile girlie herself, the inode you're pulling from. πcnoβ the number of the checkpoint entry you wanna read. It's a__u64, so like, big numbers welcome.rootβ the nilfs root object. She's the main character everything gets attached to.ifileβ the ifile's inode that gets read and attached toroot. She's coming along for the ride, periodt.
β¨ DESCRIPTION β¨
So basically β¨ this function imports checkpoint information from the checkpoint file, and then stores it into two places: the inode file you passed as ifile, and the nilfs root object you passed as root. That's it. That's the function. It reads the checkpoint, it stashes the info, it's giving very much "fetch and deliver" energy π«Ά
π₯ RETURN π₯
0 on success π β or one of these negative error codes when things go sideways π:
-EINVALβ Invalid checkpoint. Like, the checkpoint said no. π-ENOMEMβ Insufficient memory available. She's out of RAM, bestie, nothing we can do π-EIOβ I/O error, which includes metadata corruption. Yeah that one's scary. Not a vibe. β
π§ SEE ALSO π§
Kernel file ./fs/nilfs2/cpfile.c β plus the whole cpfile friend group, all of whom you should also stan:
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_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_get_stat(9)nilfs_cpfile_read(9)
okay that's the whole page, ily, go read some checkpoints π this one came from ./fs/nilfs2, dated October 2026, and the page title is nilfs_cpfile...d_checkpoint(9) β mwah, slay, bye ππ
π¦ 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