From 4c9e249e3ac1fc2995e01eb1ed24799c3a3bc66b Mon Sep 17 00:00:00 2001 From: Jakob Unterwurzacher Date: Mon, 25 Jan 2016 00:51:28 +0100 Subject: 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 ) --- cryptfs/names_diriv.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cryptfs') diff --git a/cryptfs/names_diriv.go b/cryptfs/names_diriv.go index 9519ebc..45abfce 100644 --- a/cryptfs/names_diriv.go +++ b/cryptfs/names_diriv.go @@ -1,9 +1,9 @@ package cryptfs import ( - "os" "fmt" "io/ioutil" + "os" "path/filepath" "strings" "sync" -- cgit v1.2.3