-
Notifications
You must be signed in to change notification settings - Fork 997
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cp -p in the filesystem updates both mtime and ctime when it should only update ctime. #3204
Comments
It does change only the ctime in my test. Could you run
|
@SandyXSD thanks for looking into this, that is what I would have expected as well. To be honest, this log is awesome but looking at it makes me question where it's happening even more so. Here is a copy and paste of the log:
|
Well, this looks like a bug. It was good in my test because the file was empty. For a non-empty file, the mtime is correct for a very short time (set by |
@SandyXSD not a problem, we use a custom script that moves the data around and put a work around in it, to touch the files referring to the originals before removing them which works. Luckily the metadata flies with TiKV for us compared to our gluster deployment that it isn't to impacting. If there is absolutely anything I can do to help troubleshoot the issue, I'm available. We are using JFS for petabytes of warm storage so I'm invested 💯 |
From my point of this issue is important to fix, as it means juicefs is not POSIX compliant. |
What happened: cp -p does not keep mtime. Instead it looks like mtime is updated with ctime, which goes against every other file system I tested.
What you expected to happen: cp -p keeps atime and mtime and only changes ctime
How to reproduce it (as minimally and precisely as possible): cp -p oldfile newfile; stat oldfile; stat newfile; and compare results
Anything else we need to know? I tested cp -p on xfs, btrfs, ext4 and in each case, cp -p keeps the atime and mtime and only updates ctime leading me to believe this is a bug in the filesystem.
Environment:
juicefs --version
) or Hadoop Java SDK version: git mastercat /etc/os-release
): RHEL 7.9uname -a
): 3.10.0-1160.25.1.el7.e86_64The text was updated successfully, but these errors were encountered: