Commit Graph

1824 Commits

Author SHA1 Message Date
Jakob Unterwurzacher
4c9e249e3a Convert fdLock to an RWMutex and protect the whole transaction
...against concurrent closes.

The testcase

	(set -e; while true; do truncate -s $RANDOM b; done) &
	(set -e; while true; do truncate -s $RANDOM b; done) &

uncovered lots of unnecessary RMW failures that were the result
of concurrent closes.

With this patch, the only remaining error is "Truncate on forgotten file"
that is probably caused by a problem in the go-fuse lib
( https://github.com/hanwen/go-fuse/issues/95 )
2016-01-25 00:51:28 +01:00
Jakob Unterwurzacher
4259c8f7eb Only warn once for unsupported fallocate(2) and truncate(2)
Also, print the inode number in Ftruncate warnings.
2016-01-24 19:43:21 +01:00
Jakob Unterwurzacher
8fb32aab68 Downgrade "gocryptfs.diriv not found" warning if the directory was deleted
The directory may have been concurrently deleted or moved. Failure to
read the diriv is not an error in that case.

Downgrading the message to debug.
2016-01-24 19:40:53 +01:00
Jakob Unterwurzacher
65b8d5bc46 Update MANPAGE with new options 2016-01-24 18:20:52 +01:00
Jakob Unterwurzacher
9ecb489c66 Allow "-d" as an alis for "-debug", and "-quiet" as an alias for "-q" 2016-01-24 18:20:04 +01:00
Jakob Unterwurzacher
523e430685 Add "-nosyslog" options
Also, actually redirect Warn and Debug as well.
2016-01-24 18:10:18 +01:00
Jakob Unterwurzacher
2f32114bd3 Add per-inode write mutex
At the moment, FUSE writes to a single file are serialized by the kernel.
However, it is unclear if this is guaranteed behaviour or may change
in the future.

This patch adds our own per-inode write lock to rule out races regardless
of kernel behavoir.
2016-01-24 13:08:08 +01:00
Jakob Unterwurzacher
dac9f71089 tests: more helpful error message when the tmp dir cannot be cleared 2016-01-24 13:07:18 +01:00
Jakob Unterwurzacher
1030522fe6 Suppress password prompt when using -extpass
Also, add color to the error messages.
2016-01-23 20:18:39 +01:00
Jakob Unterwurzacher
e799ae672d Show new benchmark.bash in README
The old benchmark is in benchmark-builtin.bash.

renamed:    benchmarks-builtin.bash -> benchmark-builtin.bash
renamed:    benchmarks-external.bash -> benchmark.bash
2016-01-23 20:18:13 +01:00
Jakob Unterwurzacher
142ed8b2b6 Update README for v0.8 2016-01-23 19:35:51 +01:00
Jakob Unterwurzacher
4a1768a314 Automate standard performance tests 2016-01-23 19:33:03 +01:00
Jakob Unterwurzacher
ea38ff4e0b renamed: benchmark.bash -> benchmarks-builtin.bash 2016-01-23 19:32:47 +01:00
Jakob Unterwurzacher
2e419e635f Remove last SetOutput from generic code 2016-01-22 21:49:56 +01:00
Jakob Unterwurzacher
9f9cf882ad Add missing import for Go 1.4 2016-01-22 21:42:58 +01:00
Jakob Unterwurzacher
df41183e9b Disable syslog in Go 1.4 and lower (method SetOutput does not exist) 2016-01-22 21:41:34 +01:00
Jakob Unterwurzacher
505fef5a3c renamed: cryptfs/gcm_go14.go -> cryptfs/gcm_go1.4.go
renamed:    cryptfs/gcm_go15.go -> cryptfs/gcm_go1.5.go
2016-01-22 21:39:16 +01:00
Jakob Unterwurzacher
cec2da3e33 Add "-memprofile" option 2016-01-21 23:55:37 +01:00
Jakob Unterwurzacher
d163169655 Wrap Logger to make disabling output more efficient
Instead of using SetOutput(ioutil.Discard), which means
that Printf is still called for every debug message,
use a simple and fast boolean check.

Streaming write performance improves from 86 to 93 MB/s.
2016-01-21 22:59:11 +01:00
Jakob Unterwurzacher
9bab220a1b Switch to syslog when running in the background 2016-01-20 22:31:15 +01:00
Jakob Unterwurzacher
17f0eb1339 Convert logging to standard Go log.Logger
This is in preparation of logging to syslog.
2016-01-20 20:57:00 +01:00
Jakob Unterwurzacher
b9dd9e9a1c Typo in README 2016-01-19 23:08:10 +01:00
Jakob Unterwurzacher
8432382244 Update README for v0.7.2 2016-01-19 23:01:21 +01:00
Jakob Unterwurzacher
b3c9a275c7 package.bash: Encode host distribution into tar filename 2016-01-09 15:47:29 +01:00
Jakob Unterwurzacher
ecdc58baa3 Update README for v0.7.1 2016-01-09 15:31:58 +01:00
Jakob Unterwurzacher
f5fe140d5b build.bash: copy binary to $GOPATH/bin 2016-01-09 15:31:34 +01:00
Jakob Unterwurzacher
f01f599d74 Make test.bash work when called from outside the gocryptfs directory
Also, get rid of useless intermediate build step
2016-01-09 14:27:04 +01:00
Jakob Unterwurzacher
236970adee OSX: Fix build failure caused by syntax errors 2016-01-09 13:04:48 +01:00
Jakob Unterwurzacher
f93729f20d Disable fallocate on OSX (not available and causes a build failure) 2016-01-07 21:39:41 +01:00
Jakob Unterwurzacher
6a9da0db10 Add EXAMPLES to manpage 2016-01-06 16:55:38 +01:00
Jakob Unterwurzacher
6443691c7e Delete old logo 2016-01-05 21:24:28 +01:00
rfjakob
6356c559b1 README: Uppercase MIT license badge 2016-01-05 21:18:04 +01:00
rfjakob
e17282b205 README: Change to new two-color logo 2016-01-05 21:04:18 +01:00
Jakob Unterwurzacher
1936de783f Color for the "init success" message 2016-01-04 20:55:25 +01:00
rfjakob
e9ed3e85b9 README: Link to Mac OS X support tracking ticket 2016-01-04 10:24:00 +01:00
Jakob Unterwurzacher
3ea60a553e README: mention signed tags 2015-12-20 21:15:49 +01:00
Jakob Unterwurzacher
5d25c6e7e9 Link to official website; move security document 2015-12-20 18:25:10 +01:00
Jakob Unterwurzacher
57b32a0b8b Make build.bash work when called from outside the gocryptfs directory 2015-12-20 17:44:11 +01:00
Jakob Unterwurzacher
38f7dc1a17 Make build.bash version bake-in compatible with Go 1.3 and 1.4 2015-12-20 17:30:10 +01:00
Jakob Unterwurzacher
65d1f888c8 travis: also build using build.bash 2015-12-20 17:15:29 +01:00
Jakob Unterwurzacher
c703823521 travis: also build on Go 1.3.3 2015-12-20 17:06:54 +01:00
Jakob Unterwurzacher
3bbaa1208f Add logo, update README for v0.7 2015-12-20 15:42:52 +01:00
Jakob Unterwurzacher
04abad5e84 Update performance data for v0.7 2015-12-20 15:39:40 +01:00
Jakob Unterwurzacher
ad00ba38e5 Colorize output 2015-12-19 15:46:19 +01:00
Jakob Unterwurzacher
8c7e31329d Use NewGCMWithNonceSize only through goGCMWrapper to support Go 1.4 2015-12-19 15:19:31 +01:00
Jakob Unterwurzacher
1caa925868 Increase GCM IV size from 96 to 128 bits
This pushes back the birthday bound for collisions to make it virtually
irrelevant.
2015-12-19 15:02:29 +01:00
Jakob Unterwurzacher
88826dc51d diriv: handle directory rename over directory
If an empty directory is overwritten we will always get
ENOTEMPTY as the "empty" directory will still contain gocryptfs.diriv.
Handle that case by removing the target directory and trying again.

Fixes issue #10
2015-12-19 13:21:15 +01:00
Jakob Unterwurzacher
00a712b4d1 go fmt
...and minimal comment changes.
2015-12-13 20:24:13 +01:00
Jakob Unterwurzacher
8518d6d7bd Handle EINTR returned by Fallocate
Fallocate can return EINTR (interrupted system call) and does so
quite often when cpu profiling is enabled.
2015-12-13 17:17:01 +01:00
Jakob Unterwurzacher
b02ad12814 tests: overwrite directory with another directory
Testcase for issue #10 (currently failing)
2015-12-11 23:27:38 +01:00