inode_set_ctime_current(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ inode_set_ctime_current(9) ✨

okay so bestie, we are literally in the Kernel API Manual and today’s main character is inode_set_ctime_current(9). it’s giving kernel-core, no cap. πŸ’…πŸ«Ά


🌸 NAME 🌸

inode_set_ctime_current - set the ctime to current_time

🫢 SYNOPSIS 🫢

struct timespec64 inode_set_ctime_current (struct inode *inode );

πŸŽ€ ARGUMENTS πŸŽ€

  • inode β€” inode. like, that’s the whole argument, bestie. πŸŽ€

πŸ’– DESCRIPTION πŸ’–

so this one sets the inode’s ctime to the current value for the inode. it returns the current value that was assigned. slay. 🫢

if this is not a multigrain inode, then we set it to the later of the coarse time and floor value. noted. πŸ’…

if it is multigrain, then we first see if the coarse-grained timestamp is distinct from what is already there. if so, then use that. otherwise, get a fine-grained timestamp. periodt. ✨

after that, try to swap the new value into i_ctime_nsec. accept the resulting ctime, regardless of the outcome of the swap. if it has already been replaced, then that timestamp is later than the earlier unacceptable one, and is thus acceptable. iconic behavior. 🌈

πŸ‘‘ SEE ALSO πŸ‘‘

Kernel file ./fs/inode.c. and the whole see-also friend group is: inode_init_always_gfp(9), alloc_inode(9), drop_nlink(9), clear_nlink(9), set_nlink(9), inc_nlink(9), inode_sb_list_add(9), __insert_inode_hash(9), __remove_inode_hash(9), evict_inodes(9), new_inode(9), unlock_new_inode(9), lock_two_nondirectories(9), unlock_two_nondirectories(9), inode_insert5(9), iget5_locked(9), iget5_locked_rcu(9), iget_locked(9), iunique(9), ihold(9), ilookup5_nowait(9), ilookup5(9), ilookup(9), find_inode_nowait(9), find_inode_rcu(9), find_inode_by_ino_rcu(9), iput(9), iput_not_last(9), bmap(9), inode_update_time(9), generic_update_time(9), atime_needs_update(9), file_remove_privs(9), current_time(9), file_update_time(9), file_modified_flags(9), file_modified(9), kiocb_modified(9), inode_init_owner(9), inode_owner_or_capable(9), inode_dio_wait(9), timestamp_truncate(9), inode_set_ctime_deleg(9), in_group_or_capable(9), mode_strip_sgid(9), dump_inode(9).

xoxo, source/version vibe: ./fs; date: October 2026; page: inode_set_ctime_current(9). bye bestie πŸ’–

πŸ“¦ where this page comes from