diff options
author | Joey Hess <joey@kitenet.net> | 2012-06-05 20:34:25 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2012-06-05 20:34:25 -0400 |
commit | d05a22b5f6004abeef0878d164f90afc59ede9ab (patch) | |
tree | 13f71a7f4d0292726531570ae0f0880621d5ba82 /doc/design | |
parent | c981ccc0773a02ca60eb6456f04de14cd758ee7b (diff) |
closed a race, although a less likely similar one remains
Diffstat (limited to 'doc/design')
-rw-r--r-- | doc/design/assistant/inotify.mdwn | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/doc/design/assistant/inotify.mdwn b/doc/design/assistant/inotify.mdwn index ca63a1c82..5d903a9b0 100644 --- a/doc/design/assistant/inotify.mdwn +++ b/doc/design/assistant/inotify.mdwn @@ -58,12 +58,18 @@ Many races need to be dealt with by this code. Here are some of them. * File is added and then replaced with another file before the annex add moves its content into the annex. - **Currently unfixed**; The new content will be moved to the annex under the - old checksum, and fsck will later catch this inconsistency. + Fixed this problem; Now it hard links the file to a temp directory and + operates on the hard link, which is also made unwritable. - Possible fix: Move content someplace before doing checksumming. Perhaps - using a hard link and removing the write bit to prevent modification - while checksumming. +* A process has a file open for write, another one closes it, and so it's + added. Then the first process modifies it. + + **Currently unfixed**; This changes content in the annex, and fsck will + later catch the inconsistency. + + Possible fixes: Somehow track or detect if a file is open for write + by any processes. Or, when possible, making a copy on write copy + before adding the file would avoid this. * File is added and then replaced with another file before the annex add makes its symlink. |