Age | Commit message (Collapse) | Author |
|
|
|
Un-spaghettify the function and let the callers open
the directory.
|
|
Copy-paste error.
https://github.com/rfjakob/gocryptfs/issues/308
|
|
This function is in all fastpaths, will get a cache, and needs
its own file.
renamed: internal/fusefrontend/names.go -> internal/fusefrontend/openbackingdir.go
renamed: internal/fusefrontend/names_test.go -> internal/fusefrontend/openbackingdir_test.go
|
|
Finally allows us to delete EncryptPathDirIV.
|
|
Hopefully gets rid of the false positives on travis.
|
|
recent builds all failed with:
tests/fsck/fsck_test.go:12:2: cannot find package "github.com/pkg/xattr"
|
|
* listxattr is fixed via the /proc/self/fd trick
* setxattr,removexattr are fixed by opening the file O_WRONLY
Fixes https://github.com/rfjakob/gocryptfs/issues/308
|
|
https://github.com/rfjakob/gocryptfs/issues/308
|
|
|
|
Only with the "-t" flag does go get download dependencies
that are only used in tests.
|
|
Darwin now also has these functions, use them. Simplifies
the code and makes it symlink-safe on Darwin as well.
|
|
These take care of buffer sizing and parsing.
|
|
Make clear what we have and what we want.
|
|
Give the gocryptfs process one extra millisecond to close
files. Allows us to drop several other sleeps.
UnmountErr now really returns an error when it detects an fd leak
instead of just printing a message.
|
|
Reported by @slackner at
https://github.com/rfjakob/gocryptfs/commit/932efbd4593fe6be6c86f0dafeaea32910b7c246#r31813373
thanks!
|
|
Pread() needs retry logic, so instead of implementing it ourselves,
use os.File.
Reported by @slackner at
https://github.com/rfjakob/gocryptfs/commit/c09bf1f2284706232642431c75fa1f3d8500a9d0#r31813394
|
|
These are created on demand by the Go runtime and are usually
not interesting.
|
|
Tests outside the test_helpers package may want to look
at this.
|
|
|
|
Also, drop entries that disappear while we stat them.
|
|
With the FD leak logic, the mount/unmount functions have
become complex enough to give them their own file.
|
|
For now, this only prints a message but does not fail the tests.
|
|
|
|
Thanks @slackner!
Fixes https://github.com/rfjakob/gocryptfs/issues/306
|
|
|
|
This will allow to tests to monitor fd usage and maybe other things.
|
|
An Open() a fifo blocks until it is opened for writing.
This meant that xattr operations on FIFOs would block.
Pass O_NONBLOCK to fix that, and add a test.
|
|
This function is NOT symlink-safe. Darwin needs it because it lacks
fgetxattr(2) and friends.
|
|
Uses /proc/self/fd.
|
|
Uses /proc/self/fd on Linux.
|
|
Uses the /proc/self/fd trick.
|
|
Uses the /proc/self/fd trick, which does not work
on Darwin.
|
|
Test for the upcoming fd-based xattr support.
|
|
unix.UtimesNanoAt now also exists on Darwin, yay!
|
|
Failure was:
+ GOOS=darwin
+ GOARCH=amd64
+ go build -tags without_openssl
# github.com/rfjakob/gocryptfs/internal/fusefrontend
internal/fusefrontend/fs_dir.go:159:60: cannot use origMode | 448 (type uint16) as type uint32 in argument to syscallcompat.Fchmodat
internal/fusefrontend/fs_dir.go:170:33: cannot use origMode (type uint16) as type uint32 in argument to syscallcompat.Fchmodat
|
|
No changes needed.
|
|
Now uses Unlinkat.
|
|
And also rename DeleteLongName() -> DeleteLongNameAt(). The
naming follow the names open the openat() etc syscalls.
|
|
Now symlink-safe through Readlinkat().
|
|
Interestingly, little or no performance impact:
$ ./benchmark.bash
Testing gocryptfs at /tmp/benchmark.bash.39W: gocryptfs v1.6-42-g30c2349-dirty; go-fuse v20170619-66-g6df8ddc; 2018-11-04 go1.11
Downloading linux-3.0.tar.gz
/tmp/linux-3.0.tar.gz 100%[=========================================================================>] 92.20M 2.93MB/s in 31s
2018-11-04 21:44:44 URL:https://cdn.kernel.org/pub/linux/kernel/v3.0/linux-3.0.tar.gz [96675825/96675825] -> "/tmp/linux-3.0.tar.gz" [1]
WRITE: 262144000 bytes (262 MB, 250 MiB) copied, 1.1808 s, 222 MB/s
READ: 262144000 bytes (262 MB, 250 MiB) copied, 0.866438 s, 303 MB/s
UNTAR: 24.745
MD5: 12.050
LS: 3.525
RM: 9.544
Note: kernel has been updated:
$ uname -a
Linux brikett 4.18.16-200.fc28.x86_64 #1 SMP Sat Oct 20 23:53:47 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
|
|
|
|
Instead of calling syscall.Open() ourselves, rely on
openBackingDir().
|
|
Use openBackingDir() and Fstatat().
High performance impact, though part of it should be
mitigated by adding DirIV caching to the new code paths.
$ ./benchmark.bash
Testing gocryptfs at /tmp/benchmark.bash.Eou: gocryptfs v1.6-37-ge3914b3-dirty; go-fuse v20170619-66-g6df8ddc; 2018-10-14 go1.11
WRITE: 262144000 bytes (262 MB, 250 MiB) copied, 1.2289 s, 213 MB/s
READ: 262144000 bytes (262 MB, 250 MiB) copied, 1.02616 s, 255 MB/s
UNTAR: 24.490
MD5: 13.120
LS: 3.368
RM: 9.232
|
|
openBackingDir() used encryptPath(), which is not symlink-safe
itself. Drop encryptPath() and implement our own directory walk.
Adds three seconds to untar and two seconds to rm:
$ ./benchmark.bash
Testing gocryptfs at /tmp/benchmark.bash.MzG: gocryptfs v1.6-36-g8fb3c2f-dirty; go-fuse v20170619-66-g6df8ddc; 2018-10-14 go1.11
WRITE: 262144000 bytes (262 MB, 250 MiB) copied, 1.25078 s, 210 MB/s
READ: 262144000 bytes (262 MB, 250 MiB) copied, 1.0318 s, 254 MB/s
UNTAR: 20.941
MD5: 11.568
LS: 1.638
RM: 5.337
|
|
Document which FUSE calls are already symlink-safe in
the function comment.
|
|
DecryptPath is now symlink-safe through the use of *at()
functions.
|
|
Make Access() symlink-safe through use of faccessat.
|
|
So the reader does not have to read through the whole ticket.
The commit message has a nice summary of the problem.
|
|
|