nilfs_ioctl_change_cpmode(9)
π nilfs_ioctl_change_cpmode(9) β the Kernel API Manual, bestie edition π
okay so this page lives in the Kernel API Manual and it's literally called nilfs_ioctl_change_cpmode(9) β say that five times fast, i dare you π it's the glow-up button for checkpoints, fr fr.
β¨ NAME β¨
nilfs_ioctl_change_cpmode β change checkpoint mode (checkpoint/snapshot) π¦
the way this function just. flips a checkpoint between two whole identities?? main character energy honestly π
πΈ SYNOPSIS πΈ
int nilfs_ioctl_change_cpmode (struct inode *inode , struct file *filp ,
unsigned int cmd , void __user *argp );
copy it exactly like that, spacing and all, don't come for me π
π ARGUMENTS π
inodeβ inode object. the little guy in question π«Άfilpβ file object. yep, the file one β¨cmdβ ioctl's request code. it's giving "which flavour of request are we doing" πargpβ pointer on argument from userspace. that pointer comes straight from userspace, no cap π
π₯ DESCRIPTION π₯
so nilfs_ioctl_change_cpmode changes the mode of a given checkpoint between checkpoint and snapshot state. that's it, that's the whole vibe β one checkpoint, two states, one function to shuffle between them π«
and where do you actually meet this icon? this ioctl is used in the chcp and mkcp utilities. yup, those ones. iykyk π§
β RETURN β
0 on success π or one of these negative error codes if it's not slaying:
-EFAULTβ Failure during checkpoint mode changing. π something went sideways mid-change-EPERMβ Operation not permitted. π you simply do not have the range for this one
ngl, negative error codes are the "read the room" of the kernel β check them, bestie, always π
πΈ SEE ALSO πΈ
the whole friend group, in order, zero skips:
- Kernel file
./fs/nilfs2/ioctl.c nilfs_ioctl_wrap_copy(9)nilfs_fileattr_get(9)nilfs_fileattr_set(9)nilfs_ioctl_getversion(9)nilfs_ioctl_delete_checkpoint(9)nilfs_ioctl_do_get_cpinfo(9)nilfs_ioctl_get_cpstat(9)nilfs_ioctl_do_get_suinfo(9)nilfs_ioctl_get_sustat(9)nilfs_ioctl_do_get_vinfo(9)nilfs_ioctl_do_get_bdescs(9)nilfs_ioctl_get_bdescs(9)nilfs_ioctl_move_inode_block(9)nilfs_ioctl_move_blocks(9)nilfs_ioctl_delete_checkpoints(9)nilfs_ioctl_free_vblocknrs(9)nilfs_ioctl_mark_blocks_dirty(9)nilfs_ioctl_clean_segments(9)nilfs_ioctl_sync(9)nilfs_ioctl_resize(9)nilfs_ioctl_trim_fs(9)nilfs_ioctl_set_alloc_range(9)nilfs_ioctl_get_info(9)nilfs_ioctl_set_suinfo(9)nilfs_ioctl_get_fslabel(9)nilfs_ioctl_set_fslabel(9)
like, that's a whole entourage π
π sign-off π
this little beauty comes from ./fs/nilfs2 and it's dated October 2026 β screenshot it, bookmark it, obsess over it, and go flip some checkpoints, bestie πβ¨π
π¦ 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