Commit Graph

1682 Commits

Author SHA1 Message Date
Jakob Unterwurzacher
95ea7383f9 fsck: make sure we unmount in all cases 2020-10-17 23:03:58 +02:00
Jakob Unterwurzacher
83a324a46b syscallcompat: add Lgetxattr benchmark 2020-10-16 20:04:22 +02:00
Jakob Unterwurzacher
d656574d08 performance.txt: add gocryptfs v1.8.0 results 2020-10-16 20:03:59 +02:00
Jakob Unterwurzacher
f99050b78a Update performance.txt with gocryptfs v2.0-beta1 result
As expected, we are slow. Fd caching will be implemented later.
2020-10-16 19:13:32 +02:00
Jakob Unterwurzacher
95775bf52c Update README for v2.0-beta1 2020-10-15 23:23:07 +02:00
Jakob Unterwurzacher
fcb28e4ff3 v2pai: delete fusefrontend_reverse_v1api
Served its mission a copy-paste source but can now be deleted.
2020-10-15 23:18:21 +02:00
Jakob Unterwurzacher
f03f56844b go.mod: temporarily switch to patched go-fuse fork
Use our fork until https://review.gerrithub.io/c/hanwen/go-fuse/+/503508
gets merged.

Command used was:

	go mod edit -replace github.com/hanwen/go-fuse/v2=github.com/rfjakob/go-fuse/v2@knodes_upstreaming_v3
2020-10-15 22:45:06 +02:00
Jakob Unterwurzacher
a2f48eb838 contrib: cleanup-tmp-mounts: also clean ext4-ramdisk 2020-10-15 17:49:17 +02:00
Jakob Unterwurzacher
871f305f90 main: show microseconds in go-fuse logs
Suppress the date but show microseconds in fuse debug logs
(-fusedebug) and go-fuse warnings.
2020-10-14 15:37:37 +02:00
Jakob Unterwurzacher
ec3eaf0b87 syscallcompat: don't retry Close()
After Close() returns, the fd is dead, even if we
received EINTR. Don't retry, we could shoot down
an unrelated fd that received the same fd number.
2020-10-14 13:40:12 +02:00
Jakob Unterwurzacher
af4c1fb7a3 syscallcompat: retry ops on EINTR
Retry operations that have been shown to throw EINTR
errors on CIFS.

Todo: Solution for this pain in the back:

	warning: unix.Getdents returned errno 2 in the middle of data
	rm: cannot remove 'linux-3.0.old3/Documentation/ABI/removed': Input/output error

Progress towards fixing https://github.com/rfjakob/gocryptfs/issues/483 .
2020-10-14 00:35:16 +02:00
Jakob Unterwurzacher
803fdf410b syscallcompat: Openat: retry on EINTR
Towards fixing https://github.com/rfjakob/gocryptfs/issues/507
2020-10-11 01:31:09 +02:00
Jakob Unterwurzacher
fe340477b2 build.bash: show "go mod edit -replace" in version string
If you do something like this,

  go mod edit -replace github.com/hanwen/go-fuse/v2=/home/jakob/go/src/github.com/hanwen/go-fuse

the version string of the resulting binary should reflect that.

Before:

  gocryptfs v1.8.0-135-g352b547-dirty.gofuse_v2api; go-fuse v2.0.4-0.20200908172753-0b6cbc515082; 2020-10-03 go1.15.2 linux/amd64

After:

  gocryptfs v1.8.0-135-g352b547-dirty.gofuse_v2api; go-fuse v2.0.4-0.20200908172753-0b6cbc515082 => /home/jakob/go/src/github.com/hanwen/go-fuse; 2020-10-03 go1.15.2 linux/amd64
2020-10-04 00:12:46 +02:00
Jakob Unterwurzacher
754c483870 tests: fsstress-gocryptfs.bash: log timestamp for each iteration 2020-10-04 00:12:46 +02:00
Jakob Unterwurzacher
66449bf56b tests: fsstress-gocryptfs.bash: add DEBUG option
Also add a wrapper script, fsstress.collect-crashes.sh, to collect
the debug output.

https://github.com/hanwen/go-fuse/issues/372
2020-10-04 00:12:25 +02:00
Jakob Unterwurzacher
3c5a80c27b fsstress-gocryptfs.bash: don't hang if TMPDIR ends in /
We would hang like this

   ./fsstress-loopback.bash
  Recompile go-fuse loopback: v2.0.3-7-g0b6cbc5
  Waiting for mount: xxxxxxxx^C

if TMPDIR has a trailing /. The reason is that the
paths in /proc/self/mounts are normalized, while
TMPDIR may not be.
2020-10-03 14:23:37 +02:00
Pavol Rusnak
068692ac31 go mod tidy 2020-09-21 14:15:21 +02:00
Jakob Unterwurzacher
27c92f63be fsstress-gocryptfs.bash: print loopback version & mount path
To make the used go-fuse version clear in logs,
print it on startup, similar to what we do with gocryptfs.
2020-09-18 18:31:22 +02:00
Jakob Unterwurzacher
95caa66e0b contrib/mount-ext4-ramdisk.sh: clean up in error case
Also fix all shellcheck warnings.
2020-09-18 13:21:07 +02:00
Jakob Unterwurzacher
55fcacfc27 Add contrib/mount-ext4-ramdisk.sh 2020-09-14 19:01:33 +02:00
Jakob Unterwurzacher
af7386713c stress_tests/fsstress-gocryptfs.bash: use rm -Rf for cleanup
Apparently, kernel 5.8 now allows unprivileged "mknod /tmp/x c 0 0":

	vfs: allow unprivileged whiteout creation
	https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.8.9&id=a3c751a50fe6bbe50eb7622a14b18b361804ee0c

which is why rm throws a new prompt:

	rm: remove write-protected character special file '...'?

Use rm -Rf to suppress that.
2020-09-13 14:14:23 +02:00
Jakob Unterwurzacher
04b46c7adf go.mod: update go-fuse 2020-09-12 18:10:29 +02:00
Pavol Rusnak
1e624a4cc3 Add support for FIDO2 tokens 2020-09-12 18:06:54 +02:00
Jakob Unterwurzacher
6a9c49e9cf tests/plaintextnames: add TestInoReuseEvil 2020-09-12 17:55:37 +02:00
Jakob Unterwurzacher
db61ec5115 tests: add TestInoReuse 2020-09-09 18:18:37 +02:00
Jakob Unterwurzacher
6577f1b146 test_helpers: print warning when not running on ext4
ext4 reuses inode numbers, tmpfs does not.
2020-09-09 11:47:17 +02:00
Jakob Unterwurzacher
ac687d5359 v2api: add Darwin xattr support 2020-09-09 11:17:19 +02:00
Jakob Unterwurzacher
8b1df08b8a syscallcompat: add Renameat2 for Darwin 2020-09-09 11:16:29 +02:00
Jakob Unterwurzacher
7c0363dee5 test_helpers: mark MountOrFatal as a Helper() 2020-09-09 11:15:54 +02:00
Jakob Unterwurzacher
570e9baadf manpage: link to exitcodes.go 2020-09-06 11:38:13 +02:00
Jakob Unterwurzacher
993b19c19c gocryptfs -init: fix wrong exit code on non-empty dir
Fixes https://github.com/rfjakob/gocryptfs/pull/503
2020-09-06 11:35:25 +02:00
Jakob Unterwurzacher
598e5f385e v2api/reverse: update TODO comment on xattrs 2020-08-30 16:39:46 +02:00
Jakob Unterwurzacher
3806a8cc93 tests/reverse: implement (skipped) xattr test
v1api reverse mode did not have xattr support,
the v2api version may have at some point. Prep the
test already.
2020-08-30 16:36:10 +02:00
Jakob Unterwurzacher
d212b246c5 v2api/reverse: implement Lseek 2020-08-16 19:58:47 +02:00
Jakob Unterwurzacher
58a2726977 v2api/reverse: implement Statfs 2020-08-16 19:41:00 +02:00
Jakob Unterwurzacher
6f3cca2cdd v2api: clean up api TODOs 2020-08-16 13:52:27 +02:00
Jakob Unterwurzacher
ee5ab1cc29 v2api: rename "File2" to just "File"
Rename the symbols and the files.
2020-08-16 12:50:33 +02:00
Jakob Unterwurzacher
94e8fc12ea v2api/reverse: finish -exclude
Tests pass now.
2020-08-15 17:31:45 +02:00
Jakob Unterwurzacher
15b0b4a5fd v2api/reverse: start wiring up -exclude functionality
Exclude in readdir is missing.
2020-08-15 16:08:16 +02:00
Jakob Unterwurzacher
f270135c16 test_helper: VerifyExistence: don't panic
Instead bubble up the error to the testing object.
2020-08-15 15:39:08 +02:00
Jakob Unterwurzacher
1ea1b179c2 v2api/reverse: fix two fd leaks 2020-08-15 15:28:40 +02:00
Jakob Unterwurzacher
35055030a1 v2api/reverse: implement ctlsocksrv.Interface 2020-08-15 15:08:28 +02:00
Jakob Unterwurzacher
b6580a87e5 v2api/reverse: implement gocryptfs.conf mapping with -plaintextnames 2020-08-15 15:05:25 +02:00
Jakob Unterwurzacher
6d4f1a6888 v2api/reverse: implement Read 2020-08-09 22:11:46 +02:00
Jakob Unterwurzacher
5276092663 v2api/reverse: implement Readlink 2020-08-08 18:45:47 +02:00
Jakob Unterwurzacher
84ed139cd2 v2api/reverse: implement Lookup for longname 2020-08-02 19:33:12 +02:00
Jakob Unterwurzacher
4674bac838 v2api/reverse: implement Lookup for gocryptfs.conf & gocryptfs.diriv 2020-08-02 13:25:53 +02:00
Jakob Unterwurzacher
47d8f56b7f v2api/reverse: add missing decryptPath call openBackingDir 2020-08-01 23:06:35 +02:00
Jakob Unterwurzacher
6c26cda531 v2api/reverse: implement Readdir 2020-08-01 22:28:25 +02:00
Jakob Unterwurzacher
f54d21c384 v2api/reverse: implement Lookup & Getattr 2020-08-01 21:14:33 +02:00