mirror of
https://github.com/facebook/sapling.git
synced 2024-10-09 08:18:15 +03:00
fbeb35cbdc
Summary: Eden attempts to initialize timestamps of newly loaded inodes with the time of the last checkout operation performed in this mount. Unfortunately it had a number of bugs in this logic: EdenMount had two separate fields attempting to track the last checkout time: `lastCheckoutTime_` and `parentInfo_.lastCheckoutTime`. Unfortunately neither field was actually updated on checkout operations. Additionally, `lastCheckoutTime_` did not have any locking to allow it to be updated. `parentInfo_.lastCheckoutTime` did have locking, but it used the mount point's checkout lock, so it could not be accessed during checkout operations. This diff removes `parentInfo_.lastCheckoutTime`, keeping only `lastCheckoutTime_`. It also converts `lastCheckoutTime_` to a `struct timespec` since this is most often needed as a `timespec`. It also adds a new mountpoint-wide lock for synchronizing accessing to this variable. Reviewed By: bolinfest Differential Revision: D6356698 fbshipit-source-id: db54f9bb297b5febe4642e2b3fcc8055a6afc199 |
||
---|---|---|
.. | ||
test | ||
FakeBackingStore.cpp | ||
FakeBackingStore.h | ||
FakeObjectStore.cpp | ||
FakeObjectStore.h | ||
FakeTreeBuilder.cpp | ||
FakeTreeBuilder.h | ||
HgRepo.cpp | ||
HgRepo.h | ||
StoredObject.h | ||
TARGETS | ||
TestChecks.h | ||
TestMount.cpp | ||
TestMount.h | ||
TestUtil.cpp | ||
TestUtil.h |