Commit graph

4038 commits

Author SHA1 Message Date
Joey Hess
de04f7153c Merge branch 'watch' of https://github.com/bgamari/git-annex into watch 2012-06-16 11:37:28 -04:00
Ben Gamari
0b7047f750 stm package name is lowercase 2012-06-16 13:59:20 +02:00
Joey Hess
7d6329e5e4 check lsof at runtime 2012-06-16 02:49:26 -04:00
Joey Hess
0052cec2b7 add lsof build deps
Check for it in configure; and add a --force option for people without it
who want to live dangerously.
2012-06-15 23:29:39 -04:00
Joey Hess
5d63c2a4bb check files with lsof in batches before adding
I've tested both cases where this is necessary, and it works great!
A file with multiple writers is not added until the last one closes.
2012-06-15 22:36:42 -04:00
Joey Hess
bb6074dfea work around a wrinkle in how lsof handles hard links to files that are open elsewhere
+d is probably more expensive, but I need it
2012-06-15 22:34:42 -04:00
Joey Hess
3dac81d345 remove newly created tmp file before linking 2012-06-15 22:19:12 -04:00
Joey Hess
d91950ecba cleanup 2012-06-15 22:16:13 -04:00
Joey Hess
e32dda07ca better temp file handling 2012-06-15 22:16:00 -04:00
Joey Hess
1bae56e4a0 tweak 2012-06-15 22:06:59 -04:00
Joey Hess
7ee300a47f race avoidance
When there are duplicate add events for the same file, only add it once.
2012-06-15 20:55:03 -04:00
Joey Hess
96ac25094b fix pid file writing
need to truncate, or part of previous longer pid may be left after writing
2012-06-15 20:42:53 -04:00
Joey Hess
59abd787c9 can't wait for LinkChanges specifically
There is indeed a race waiting for LinkChanges:

1. file annexed, link made
2. link deleted
3. inotify event for link creation runs, but as link is gone, handler is not run
2012-06-15 19:17:21 -04:00
Joey Hess
679ef4c858 continued work on deferred addding 2012-06-15 19:00:06 -04:00
Joey Hess
c27c751b34 preliminary deferring of file adds to commit time
Defer adding files to the annex until commit time, when during a batch
operation, a bundle of files will be available. This will allow for
checking a them all with a single lsof call.

The tricky part is that adding the file causes a symlink change inotify.
So I made it wait for an appropriate number of symlink changes to be
received before continuing with the commit. This avoids any delay
in the commit process. It is possible that some unrelated symlink change is
made; if that happens it'll commit it and delay committing the newly added
symlink for 1 second. This seems ok. I do rely on the expected symlink
change event always being received, but only when the add succeeds.

Another way to do it might be to directly stage the symlink, and then
ignore the redundant symlink change event. That would involve some
redundant work, and perhaps an empty commit, but if this code turns
out to have some bug, that'd be the best way to avoid it.

FWIW, this change seems to, as a bonus, have produced better grouping
of batch changes into single commits. Before, a large batch change would
result in a series of commits, with the first containing only one file,
and each of the rest bundling a number of files. Now, the added wait for
the symlink changes to arrive gives time for additional add changes to
be processed, all within the same commit.
2012-06-15 19:00:06 -04:00
Joey Hess
8c7dfc93b5 catch IO exceptions in runThreadState
A few places catch IO errors after calling runThreadState,
but since the MVar was not restored, it'd later deadlock trying to read
from it.

I'd like to catch all exceptions here, but I could not get the types
to unify.
2012-06-15 19:00:06 -04:00
Joey Hess
53d2e81ffd Merge branch 'master' into watch 2012-06-15 15:20:11 -04:00
Joey Hess
85db1720e9 add lsof interface
Uses lsof -F0 to get machine-readable output
2012-06-15 15:13:31 -04:00
Joey Hess
af7b6319d7 move 2012-06-15 15:11:18 -04:00
Joey Hess
18e0393434 Merge branch 'master' of ssh://git-annex.branchable.com 2012-06-15 15:11:06 -04:00
https://www.google.com/accounts/o8/id?id=AItOawkSq2FDpK2n66QRUxtqqdbyDuwgbQmUWus
df56fc3702 2012-06-15 19:10:36 +00:00
https://www.google.com/accounts/o8/id?id=AItOawkSq2FDpK2n66QRUxtqqdbyDuwgbQmUWus
9e5c5bb6e1 2012-06-15 19:06:45 +00:00
http://denis.laxalde.org/
98148bece8 2012-06-15 18:57:08 +00:00
Joey Hess
9c519ba955 not bash specific 2012-06-15 14:22:00 -04:00
http://joeyh.name/
4ecbf78eca Added a comment 2012-06-15 18:21:03 +00:00
Joey Hess
96a43ef5bc Merge branch 'master' of ssh://git-annex.branchable.com 2012-06-15 14:15:22 -04:00
Joey Hess
01beef4459 fix make-sdist to omit too long filenames 2012-06-15 14:14:50 -04:00
Joey Hess
4b2b5e820e add 2012-06-15 14:11:09 -04:00
https://www.google.com/accounts/o8/id?id=AItOawmURXBzaYE1gmVc-X9eLAyDat_6rHPl670
a6dafe9f72 Added a comment: Error when installing from Hackage 2012-06-15 17:39:46 +00:00
Joey Hess
a95149ac0f quarantine idea to avoid repeated lsof calls 2012-06-15 12:22:28 -04:00
http://joeyh.name/
37a13de8ff Added a comment 2012-06-15 15:23:21 +00:00
http://joeyh.name/
5e0f179077 Added a comment 2012-06-15 15:14:53 +00:00
https://www.google.com/accounts/o8/id?id=AItOawl9sYlePmv1xK-VvjBdN-5doOa_Xw-jH4U
c3eb00271c Added a comment 2012-06-15 10:21:17 +00:00
https://www.google.com/accounts/o8/id?id=AItOawl9sYlePmv1xK-VvjBdN-5doOa_Xw-jH4U
20744d3146 Added a comment: Battery usage 2012-06-15 09:57:34 +00:00
https://www.google.com/accounts/o8/id?id=AItOawkSq2FDpK2n66QRUxtqqdbyDuwgbQmUWus
fb33e55a6e Added a comment 2012-06-15 08:58:18 +00:00
http://dieter-be.myopenid.com/
c51c4685f2 Added a comment: filesystem number of open file handles on a file 2012-06-15 08:21:37 +00:00
http://wiggy.net/
1d5246fb20 Added a comment: os compatibility 2012-06-15 07:19:24 +00:00
Joey Hess
c24e86c7e1 add news item for git-annex 3.20120614 2012-06-14 20:34:10 -04:00
Joey Hess
8492f1c182 releasing version 3.20120614 2012-06-14 20:32:06 -04:00
Joey Hess
ca9d94a0ad addurl: Was broken by a typo introduced 2 released ago, now fixed. Closes: #677576 2012-06-14 20:20:03 -04:00
Joey Hess
06caf52f03 blog for the day 2012-06-14 20:06:43 -04:00
Joey Hess
6b56abf215 hard problems are fun? 2012-06-14 12:43:23 -04:00
Joey Hess
686760befc typo 2012-06-14 12:27:30 -04:00
Joey Hess
e0095b0bdc fishy commit 2012-06-14 00:01:48 -04:00
Joey Hess
89dad12b35 update 2012-06-13 19:32:09 -04:00
Joey Hess
b1a4d55836 Merge branch 'master' into watch 2012-06-13 19:30:13 -04:00
Joey Hess
a40dc2d390 typo 2012-06-13 19:30:07 -04:00
Joey Hess
6be8cc1802 blog for the day 2012-06-13 19:26:22 -04:00
Joey Hess
8919c2e4da check for unstaged old symlinks in the sanity checker 2012-06-13 19:25:47 -04:00
Joey Hess
4b9b9b4947 add sanity checker thread
Currently wakes up once a day, and does nothing. :)
2012-06-13 17:54:23 -04:00