feat(native): preserve access and birth time of every entry
Read atime and btime with statx and set them together with owner, mode and mtime. Verification compares both, so a published snapshot must match the source in all three times. The integration fixture compares the times through libcephfs, since ceph-fuse does not expose the birth time. The ctime cannot be preserved: Ceph 21.2.0 accepts CEPH_SETATTR_CTIME but stores the time of the call. The rsync backend still preserves only the mtime. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
a6fda8f8d3
commit
02ebc08c88
7 files changed
+137
-19
No files matched your search
@@ -202,7 +202,8 @@ func syncNativeMetadataKnown(src, dst storage.FS, from, to string, n, target sto
|
||||
return fmt.Errorf("native type mismatch at %s", to)
|
||||
}
|
||||
|
||||
different := n.Mode != target.Mode || n.UID != target.UID || n.GID != target.GID || !n.Mtime.Equal(target.Mtime)
|
||||
different := n.Mode != target.Mode || n.UID != target.UID || n.GID != target.GID ||
|
||||
!n.Atime.Equal(target.Atime) || !n.Mtime.Equal(target.Mtime) || !n.Btime.Equal(target.Btime)
|
||||
if different {
|
||||
if verify {
|
||||
return fmt.Errorf("native metadata mismatch at %s", to)
|
||||
|
||||
Reference in new issue
Block a user