Skip to content

Commit 3a2e2bb

Browse files
muirdmmeta-codesync[bot]
authored andcommitted
inodes: preserve access time while unloaded
Summary: Retain `lastFsRequestTime` in `UnloadedInode` and restore it when `InodeMap` reconstructs an `InodeBase`. Keep restoration private to `InodeMap` so a published inode cannot overwrite a newer filesystem request timestamp. Serialize the raw timestamp in an optional takeover field so inode age survives graceful restart; payloads from older versions default to the receiver current time. I am making GC more aware/compatible with remembered inodes. Previously GC would load remembered inodes and default the last fs time to "now" so they would never get GC'd. Instead we track the last fs time for remembered inodes in general and across takeover. Reviewed By: MichaelCuevas Differential Revision: D115455900 fbshipit-source-id: 4a7240fd2baaee68e19c6bd4228bc4dfbfb742f1
1 parent 9d2f8ea commit 3a2e2bb

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

third-party/watchman/src/eden/fs/takeover/takeover.thrift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ struct SerializedInodeMapEntry {
3737
// string as a valid ID.
3838
6: optional string hash;
3939
7: i32 mode;
40+
// EdenTimestamp persistent wire encoding.
41+
8: optional ui64 lastFsRequestTime;
4042
}
4143

4244
struct SerializedInodeMap {

0 commit comments

Comments
 (0)