diff options
author | Joey Hess <joey@kitenet.net> | 2013-02-05 16:48:00 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2013-02-05 16:48:00 -0400 |
commit | 4b690643b335b8892a0fb3b8cb05b7b50f987a36 (patch) | |
tree | 79a566f701cada6d870c388a5f8447aa9b255ee5 /doc/design/assistant | |
parent | 053587b22832cc0db37055ee90ebd9bb066b29d9 (diff) |
Deal with stale mappings for deleted file in direct mode.
The most common way for a mapping to be stale is when a file was deleted,
or renamed. Nothing updates the mappings for deletions yet.
But they can also become stale in other ways. For example a file can
be modified.
So, the mapping is not trusted to be consistent. When we get a key,
only replace symlinks that still point to that key with its content.
When we drop a key, only put back symlinks for files that still have
the direct mode content.
Diffstat (limited to 'doc/design/assistant')
-rw-r--r-- | doc/design/assistant/desymlink.mdwn | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/doc/design/assistant/desymlink.mdwn b/doc/design/assistant/desymlink.mdwn index 64c56f466..05f965358 100644 --- a/doc/design/assistant/desymlink.mdwn +++ b/doc/design/assistant/desymlink.mdwn @@ -87,6 +87,12 @@ is converted to a real file when it becomes present. * kqueue does not deliver an event when an existing file is modified. This doesn't affect OSX, which uses FSEvents now, but it makes direct mode assistant not 100% on other BSD's. +* The mapping is not updated when files are deleted (or for the deletion + part of a rename). So it can contain old filenames that are no longer in + use. Code that uses the mapping has to take care to check that the + files they refer to exists, which is a good idea anyway. But, + it would be good to at some point update the mappings to remove deleted + files (fsck does this FWIW). ## done |