inode_set_ctime(9)
π inode_set_ctime β a Kernel API Manual moment (that's the manual name bestie, section 9, we're in kernel-land)
okay so picture this: you're deep in the kernel, you've got an inode, and its ctime is just... not it. you need to fix it. that's the whole vibe of this page. it's inode_set_ctime, and it does exactly one (1) thing and does it flawlessly. main character energy fr fr π
β¨ SYNOPSIS β¨
struct timespec64 inode_set_ctime (struct inode *inode , time64_t sec ,
long nsec );
so like, it hands you back a struct timespec64, cute of it. takes three things, gives you one back. balanced. iconic. π
πΈ ARGUMENTS πΈ
inodeβ the inode you're setting the ctime on, obviously. the target. the chosen one. π«Άsecβ thetv_secvalue you wanna set. the big seconds. the whole-number part of the story.nsecβ thetv_nsecvalue you wanna set. the lil nanoseconds, the fine print, the sparkle on top β¨
π« DESCRIPTION π«
okay so the actual deal: it sets the ctime in inode to { sec, nsec }. that's it. that's the function. no hidden lore, no side quests, no plot twists. you give it an inode and a time, it puts the time in the inode. slay.
ngl the simplicity is the point here β it's giving "i do one job and i do it well" and honestly? we respect it. π
lowkey a reminder thatsecandnsecare the two halves of one timestamp βtv_secandtv_nsecβ and they go in together as{ sec, nsec }. don't split them up bestie, they're a package deal π
π¦ SEE ALSO π¦
if you liked this one, the whole friend group lives over in the kernel file ./include/linux/fs.h β go say hi, they're all linked together, it's a whole ecosystem:
enum positive_aop_returns(9)struct address_space(9)struct file_ra_state(9)struct file(9)i_uid_into_vfsuid(9)i_uid_needs_update(9)i_uid_update(9)i_gid_into_vfsgid(9)i_gid_needs_update(9)i_gid_update(9)inode_fsuid_set(9)inode_fsgid_set(9)fsuidgid_has_mapping(9)file_write_started(9)file_write_not_started(9)struct renamedata(9)is_mgtime(9)iput_if_not_last(9)is_idmapped_mnt(9)file_start_write(9)file_end_write(9)kiocb_start_write(9)kiocb_end_write(9)name_is_dot_dotdot(9)name_contains_dotdot(9)inode_dio_begin(9)inode_dio_end(9)generic_ci_validate_strict_name(9)
twenty-eight whole besties. iykyk π
aaaand that's the page!! π§ no cap, this one was short and sweet and i ate. this lil gem lives in ./include/linux and the version date is stamped October 2026 β so if you're reading this in october 2026, hi, you're right on time, hope your ctime is immaculate ππ
k byeee, go set some timestamps responsibly 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