mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-11-13 15:29:12 +01:00
mount: keep a link change's ctime in the dirty entry
The flush does not restamp times, so a dirty entry carrying an earlier write's ctime moved the filer's ctime back from the link or unlink. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
abe03ccbd3
commit
b6dfb75cc9
1 file changed
+3
@@ -255,6 +255,9 @@ func (fh *FileHandle) adoptLinkChangeLocked(stored *filer_pb.Entry, versionTsNs
|
||||
fh.UpdateEntry(func(entry *filer_pb.Entry) {
|
||||
entry.Name = linked.Name
|
||||
entry.HardLinkId, entry.HardLinkCounter = linked.HardLinkId, linked.HardLinkCounter
|
||||
if a, b := entry.Attributes, linked.Attributes; a != nil && b != nil && (b.Ctime > a.Ctime || b.Ctime == a.Ctime && b.CtimeNs > a.CtimeNs) {
|
||||
a.Ctime, a.CtimeNs = b.Ctime, b.CtimeNs
|
||||
}
|
||||
})
|
||||
} else {
|
||||
fh.SetEntry(proto.Clone(linked).(*filer_pb.Entry))
|
||||
|
||||
Reference in new issue
Block a user