setattr_copy_mgtime(9)
π NAME π
setattr_copy_mgtime β update timestamps for mgtime inodes β¨
okay so first things first: this page is from the Kernel API Manual, and itβs here to explain a tiny-but-serious timestamp update helper. iykyk π
β¨ SYNOPSIS β¨
void setattr_copy_mgtime (struct inode *inode , const struct iattr *attr
);
π ARGUMENTS π
inodeβ inode timestamps to be updated. main character inode, got it? π«Άattrβ attrs for the update. itβs carrying the update deets.
π¦ DESCRIPTION π¦
With multigrain timestamps, this function takes more care to prevent races when updating the ctime. Always update the ctime to the very latest using the standard mechanism, and use that to populate the atime and mtime appropriately (unless those are being set to specific values). no cap, that last parenthetical is important β donβt let the specific-value case sneak past you π
π SEE ALSO π
- Kernel file
./fs/attr.c setattr_should_drop_sgid(9)setattr_should_drop_suidgid(9)chown_ok(9)chgrp_ok(9)setattr_prepare(9)inode_newsize_ok(9)setattr_copy(9)notify_change(9)
xoxo bestie π β source/version: ./fs; date: October 2026; title: setattr_copy_mgtime(9). thatβs the footer vibe, periodt π«Ά
π¦ 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