Commit graph

4063 commits

Author SHA1 Message Date
Joey Hess
0ecc7dc892 close 2012-06-18 10:09:56 -04:00
Jimmy Tang
89f6f820bf Teach _Makefile_ to only do _-DWITH_INOTIFY_ when on a Linux machine. 2012-06-18 10:09:13 -04:00
https://www.google.com/accounts/o8/id?id=AItOawkSq2FDpK2n66QRUxtqqdbyDuwgbQmUWus
762b67c163 2012-06-18 08:39:42 +00:00
https://www.google.com/accounts/o8/id?id=AItOawkSq2FDpK2n66QRUxtqqdbyDuwgbQmUWus
123df55d61 2012-06-18 08:24:24 +00:00
Joey Hess
66344a3613 Enable diskfree on kfreebsd, using statvfs.
Could not reproduce the build failure I had seen related to this,
but the numbers were wrong with statfs64. Probably pulling from the wrong
place in the structure. statvfs seems to work..
2012-06-17 18:10:57 -04:00
Joey Hess
123766963e Merge branch 'master' of ssh://git-annex.branchable.com 2012-06-17 17:24:46 -04:00
Joey Hess
9afdf7c954 blog for the day 2012-06-17 17:24:07 -04:00
Joey Hess
91567ab8f6 make inotify a build flag etc 2012-06-17 17:15:56 -04:00
Joey Hess
bf3339e5b7 Merge branch 'master' into watch 2012-06-17 15:45:35 -04:00
Joey Hess
c373f6e954 note 2012-06-17 14:25:02 -04:00
Joey Hess
1863185693 startup check fixes
Move lsof check, and display a message before daemon startup if on an
unsupported OS.
2012-06-17 14:21:29 -04:00
Joey Hess
e84b78f40c reorg 2012-06-17 14:02:40 -04:00
http://joeyh.name/
1a6f7ae00b Added a comment 2012-06-17 16:39:43 +00:00
https://www.google.com/accounts/o8/id?id=AItOawkSq2FDpK2n66QRUxtqqdbyDuwgbQmUWus
bdf66c589a Added a comment 2012-06-17 08:52:33 +00:00
Joey Hess
ec197feec0 update 2012-06-17 02:08:28 -04:00
Joey Hess
31c15aa9b9 update 2012-06-17 01:34:10 -04:00
Joey Hess
88c0951b57 Merge branch 'master' of ssh://git-annex.branchable.com 2012-06-17 01:28:21 -04:00
Joey Hess
da261b31de surveyed the OSX and BSD options for file monitoring 2012-06-17 01:28:09 -04:00
Joey Hess
9356f11c60 surveyed the OSX and BSD options for file monitoring 2012-06-17 01:25:48 -04:00
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
http://dieter-be.myopenid.com/
2a9c5ebfaa Added a comment 2012-06-16 09:14:27 +00: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
http://joeyh.name/
eaf4cbec54 Added a comment 2012-06-16 03:26:37 +00:00
Joey Hess
594fb9e565 Merge branch 'master' of ssh://git-annex.branchable.com 2012-06-15 23:01:42 -04:00
Joey Hess
bd8319e78c update and blog for the day
the last of the bad bugs is fixed!
2012-06-15 22:59:32 -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
http://denis.laxalde.org/
0641d60533 Added a comment: nautilus 2012-06-15 19:57:31 +00:00
http://joeyh.name/
3a05b66cf9 Added a comment 2012-06-15 19:25:59 +00: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