stat(2): expand list of syscalls that modify st_mtim
creat, link, rename, rmdir, symlink, truncate, and unlink all modify st_mtim
as well as st_ctim. Verified on UFS and ZFS.
Differential D18410
stat(2): expand list of syscalls that modify st_mtim asomers on Dec 2 2018, 11:35 PM. Authored by Tags None Referenced Files
Subscribers
Details
stat(2): expand list of syscalls that modify st_mtim creat, link, rename, rmdir, symlink, truncate, and unlink all modify st_mtim
Diff Detail
Event TimelineComment Actions I do not understand this change. Are you claiming that link(2) modifies mtim ? If yes, for which vnode ? Comment Actions Yes. link(2) and every other syscall that creates a new file, like mkdir(2), mkfifo(2), creat(2), etc modify the ctime and mtime of the parent directory. Also, I should remove mknod(2) from the list of syscalls that modify atime. Comment Actions Ok then, in the current form the patch is not correct. For link(2), we have two vnodes, the one which gets additional name, and the directory where the name is placed. The patch makes the confusion between them. One option to make the patch correct is to add a new list with enumeration of syscalls which change mtime of the directories participating in the operation (so e.g. creat(2) would be listed twice, one time for the created vnode, and another for the directory where the link to the created vnode is placed). Another option is to just note that all syscalls that modify directories update its mtime. This seems much more maintainable, because we do add new syscalls, so the list becomes stale fast. Also, I think you would need to list from 1/4 to 1/3 of all syscalls to make the list complete to start from. Also, for ordinary file accesses, the page fails to mention modifications of the writeable memory mappings of the files. Comment Actions
What wording would you like for that?
|