Commit graph

4123 commits

Author SHA1 Message Date
Joey Hess
f684f282f2 blog for the day 2012-06-18 18:21:03 -04:00
Joey Hess
1f6d80007c blog for the day 2012-06-18 18:07:29 -04:00
Joey Hess
b141d9bcc8 retry interrupted kevent calls
Many thanks to geekosaur in #haskell for help with this.
2012-06-18 18:03:50 -04:00
Joey Hess
a11825a1f1 add test stub 2012-06-18 16:56:05 -04:00
Joey Hess
d680ff7ef0 kqueue code compiles on debian kfreebsd 2012-06-18 16:34:08 -04:00
Joey Hess
90d565149a flesh out kqueue library
Have not tried to build this yet. But barring minor mistakes, I think it's
good.
2012-06-18 16:18:59 -04:00
Joey Hess
89fcee03d0 add some utility functions for later
Will need to update the DirMap to add or remove subdirs.
2012-06-18 13:22:36 -04:00
Joey Hess
a39b73d118 recurse dirTree and open the directories for kqueue to watch 2012-06-18 13:01:58 -04:00
Joey Hess
dc3d9d1e98 added dirTree 2012-06-18 12:53:57 -04:00
Joey Hess
3c8a9043b6 skeleton C library for calling kqueue 2012-06-18 12:25:20 -04:00
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