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:
Sebastian UnterschützandClaude Opus 5.5 committed 2026-12-03 18:48:25 +01:00
1 parent a6fda8f8d3
commit 02ebc08c88
7 files changed
+137 -19

No files matched your search

+5 -2
View File
@@ -11,7 +11,10 @@ type Node struct {
Mode uint32
Inode, Version, Nlink, Size, Rdev uint64
UID, GID uint32
Mtime time.Time
// Access, modification and birth time. The change time is not part of
// Node because no filesystem interface allows setting it.
Atime, Mtime, Btime time.Time
}
// File type bits of Node.Mode, as in stat(2).
@@ -80,7 +83,7 @@ type FS interface {
Symlink(string, string) error
Readlink(string) (string, error)
Mknod(string, uint32, uint64) error
SetAttr(string, Node) error // Numeric owner, mode and mtime; no symlink following.
SetAttr(string, Node) error // Numeric owner, mode, atime, mtime and btime; no symlink following.
ListXattr(string) ([]string, error)
GetXattr(string, string) ([]byte, error)
SetXattr(string, string, []byte) error