nilfs_ioctl_change_cpmode(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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:

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