diff options
author | Nicolas Lacasse <nlacasse@google.com> | 2018-08-27 14:25:21 -0700 |
---|---|---|
committer | Shentubot <shentubot@google.com> | 2018-08-27 14:26:29 -0700 |
commit | 0b3bfe2ea30d491a6533f8ee74eb6e3cea707f06 (patch) | |
tree | 1be36b37d8d3f6d47fed0f17af901311eb51bb90 /runsc/container/fs_test.go | |
parent | 5999767d53d6c00d7e0f1966700e2876879f490e (diff) |
fs: Fix remote-revalidate cache policy.
When revalidating a Dirent, if the inode id is the same, then we don't need to
throw away the entire Dirent. We can just update the unstable attributes in
place.
If the inode id has changed, then the remote file has been deleted or moved,
and we have no choice but to throw away the dirent we have a look up another.
In this case, we may still end up losing a mounted dirent that is a child of
the revalidated dirent. However, that seems appropriate here because the entire
mount point has been pulled out from underneath us.
Because gVisor's overlay is at the Inode level rather than the Dirent level, we
must pass the parent Inode and name along with the Inode that is being
revalidated.
PiperOrigin-RevId: 210431270
Change-Id: I705caef9c68900234972d5aac4ae3a78c61c7d42
Diffstat (limited to 'runsc/container/fs_test.go')
0 files changed, 0 insertions, 0 deletions