summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2012-06-06 15:13:18 -0400
committerGravatar Joey Hess <joey@kitenet.net>2012-06-06 15:13:18 -0400
commit81d4991fa3b9b9a303d37eef407cc7dcdc997a94 (patch)
treef5938b4c3c242ce6c43c588d258b34263177546c
parent899334223f4c46307af6c34ae103971b5f37ce8f (diff)
thoughts
-rw-r--r--doc/design/assistant/inotify.mdwn16
1 files changed, 12 insertions, 4 deletions
diff --git a/doc/design/assistant/inotify.mdwn b/doc/design/assistant/inotify.mdwn
index 079941f59..28b3130e3 100644
--- a/doc/design/assistant/inotify.mdwn
+++ b/doc/design/assistant/inotify.mdwn
@@ -67,10 +67,18 @@ Many races need to be dealt with by this code. Here are some of them.
**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. Or, as a last resort, make
- an expensive copy of the file and add that.
+ 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.
+ * Or, as a last resort, make an expensive copy of the file and add that.
+ * Tracking file opens and closes with inotify could tell if any other
+ processes have the file open. But there are problems.. It doesn't
+ seem to differentiate between files opened for read and for write.
+ And there would still be a race after the last close and before it's
+ injected into the annex, where it could be opened for write again.
+ Would need to detect that and undo the annex injection or something.
* File is added and then replaced with another file before the annex add
makes its symlink.