Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fs: have setattr_copy handle multigrain timestamps appropriately
The setattr codepath is still using coarse-grained timestamps, even on multigrain filesystems. To fix this, fetch the timestamp for ctime updates later, at the point where the assignment occurs in setattr_copy. On a multigrain inode, ignore the ia_ctime in the attrs, and always update the ctime to the current clock value. Update the atime and mtime with the same value (if needed) unless they are being set to other specific values, a'la utimes(). Do not do this universally however, as some filesystems (e.g. most networked fs) want to do an explicit update elsewhere before updating the local inode. Reviewed-by: Darrick J. Wong <[email protected]> Reviewed-by: Josef Bacik <[email protected]> Reviewed-by: Jan Kara <[email protected]> Tested-by: Randy Dunlap <[email protected]> # documentation bits Signed-off-by: Jeff Layton <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Christian Brauner <[email protected]>
- Loading branch information