- 27 Mar, 2019 6 commits
-
-
Han-Wen Nienhuys authored
-
Han-Wen Nienhuys authored
-
Han-Wen Nienhuys authored
-
Han-Wen Nienhuys authored
Nodes can become unused due to following reasons: * no more children (see new RmChild function) * no kernel references (Forget) * stop being persistent If this happens, drop the node from the tree. Removals of nodes cascade from leaves up to parents recursively lookupCount is now protected by under Inode.mu nodeID remains under bridge.mu
-
Han-Wen Nienhuys authored
Co-author: navytux Thanks to rfjakob for general feedback. Next: - add refctr like libfuse. Use it to implement persistent nodes TODO - context for PID/caller - Opendir Open questions: grep for NOSUBMIT/TODO - how many interfaces? - explode SetAttr ?
-
Han-Wen Nienhuys authored
Go-FUSE has been trailing the kernel, and the kernel (usually) is careful to only send opcodes that are recognized. However, on GKE (GCP) the undefined opcode 2016 has been seen, leading to a crash. Fixes #276.
-
- 19 Mar, 2019 1 commit
-
-
Jakob Unterwurzacher authored
We usually were off by a factor of 256. Fixes https://github.com/rfjakob/gocryptfs/issues/375
-
- 12 Mar, 2019 1 commit
-
-
Han-Wen Nienhuys authored
This reverts commit 9dcbb223. Even though RELEASE is similar to FORGET, it must report back, or tests will hang.
-
- 11 Mar, 2019 1 commit
-
-
Han-Wen Nienhuys authored
-
- 09 Mar, 2019 2 commits
-
-
Han-Wen Nienhuys authored
-
Han-Wen Nienhuys authored
access(2) should check permissions of the caller UID/GID against file permissions. In loopback, this may not be delegated to an access syscall to the underlying file system, since that would use the UID/GID of the FUSE process.
-
- 08 Mar, 2019 5 commits
-
-
Han-Wen Nienhuys authored
-
Han-Wen Nienhuys authored
Use linear search to find requests to interrupt. This assumes that interrupts are rare, and the number of outstanding requests when it happens is low. Interrupted requests are not put back into the request pool to avoid racing with in-progress mutators.
-
Han-Wen Nienhuys authored
-
Han-Wen Nienhuys authored
-
Han-Wen Nienhuys authored
-
- 06 Mar, 2019 1 commit
-
-
Han-Wen Nienhuys authored
-
- 24 Feb, 2019 2 commits
-
-
Han-Wen Nienhuys authored
INTERRUPT does not require a reply to the kernel. Trying to send it yields writer: Write/Writev failed, err: 2=no such file or directory. opcode: INTERRUPT
-
Han-Wen Nienhuys authored
-
- 23 Feb, 2019 2 commits
-
-
Han-Wen Nienhuys authored
In practice, this only triggers for RENAME_EXCHANGE, as the kernel issues the RENAME opcode in case of a normal rename or a RENAME_NOREPLACE. We have always advertised rename2 support (protocol v23), but it returned ENOSYS always. Instead, rename RenameIn => Rename1In, and add Flags to RenameIn. For raw filesystems that want to support rename2 should examine RenameIn.Flags and check for syscall.RENAME_XXX. For fuse/nodefs, we return ENOSYS in case of Rename2, since we lack API surface to propagate the flags.
-
Han-Wen Nienhuys authored
-
- 17 Feb, 2019 5 commits
-
-
Han-Wen Nienhuys authored
It is currently failing. Reported as https://github.com/libfuse/libfuse/issues/362
-
Kirill Smelkov authored
After Linux VFS was enhanced to be able to do several lookups and readdirs in parallel, FUSE client in Linux, in fear to break existing filesystems, explicitly reverted it back to be serial in FUSE exchange and requested filesystems to indicate via CAP_PARALLEL_DIROPS flag that the filesystem server is ready to handle parallel lookup and readdir requests. https://git.kernel.org/linus/5c672ab3f0 We should be ready to handle and we provide MountOptions.SingleThreaded for those filesystems, which are not ready to handle requests in parallel.
-
Kirill Smelkov authored
The first 3 are present since CAP_ABORT_ERROR is present since Linux 4.17: https://git.kernel.org/linus/3b7008b226 CAP_MAX_PAGES & CAP_CACHE_SYMLINKS are present since Linux 4.20: https://git.kernel.org/linus/5da784cce4 https://git.kernel.org/linus/5571f1e654 CAP_NO_OPENDIR_SUPPORT will be present in Linux 5.1: https://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse.git/commit?id=d9a9ea94f7
-
Kirill Smelkov authored
- They were printed with CAP_ prefix, whereas other CAP_* are printed without that prefix; - CAP_HANDLE_KILLPRIV was printed as "CAP_PARALLEL_DIROPS".
-
Kirill Smelkov authored
There was a typo, seemingly, because in linux/fuse.h these constants are defined as #define FUSE_HANDLE_KILLPRIV (1 << 19) #define FUSE_POSIX_ACL (1 << 20) (https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/include/uapi/linux/fuse.h?id=v5.0-rc6-46-gcb5b020a8d38#n282)
-
- 14 Feb, 2019 1 commit
-
-
Kirill Smelkov authored
It turned out that: 1. Linux kernel cannot send data in chunks bigger than what was configured as MaxWrite on init, and 2. if we ask for more, and that more, after capping to kernel write maxium, is more than configured MaxWrite, the kernel will simply drop NOTIFY_REPLY message. This, hopefully, will be fixed https://marc.info/?l=linux-fsdevel&m=155000277921155&w=2 but we cannot count on this fix to be present on older kernels, and even if it is there, we still won't get more than MaxWrite data. -> Rework InodeRetrieveCache to retrieve the data in chunks. NOTE1: we do not load users with this FUSE exchange details and instead of returning less content than requested, try to retrieve it all. NOTE2: without changes to fuse/server.go, added test will get stuck (see details in above link to linux-fsdevel patch).
-
- 13 Feb, 2019 7 commits
-
-
Han-Wen Nienhuys authored
-
Han-Wen Nienhuys authored
-
Kirill Smelkov authored
For example 15:12:42.711011 tx 0: NOTIFY_INVAL_ENTRY, {parent i1 sz 8} "file.txt" instead of 15:12:42.711011 tx 0: NOTIFY_INVAL_ENTRY, {parent 1 sz 8} "file.txt" using iX fits into our general logging scheme and makes logs more self-descriptive.
-
Han-Wen Nienhuys authored
-
Jakob Unterwurzacher authored
Test that READDIR works even if the directory is renamed after the OPENDIR. This checks that the fix for https://github.com/hanwen/go-fuse/issues/252 does not break this case.
-
Jakob Unterwurzacher authored
Without patch "nodefs: delay directory read till ReadDir": go-fuse/fuse/test$ go test 13:56:23.932743 Unimplemented opcode INTERRUPT 13:56:23.932902 writer: Write/Writev failed, err: 2=no such file or directory. opcode: INTERRUPT --- FAIL: TestReaddir (0.02s) loopback_test.go:578: Wrong number of directory entries: want=2 have=1 FAIL exit status 1 FAIL github.com/hanwen/go-fuse/fuse/test 1.970s With patch "nodefs: delay directory read till ReadDir": go-fuse/fuse/test$ go test 13:57:03.848021 Unimplemented opcode INTERRUPT 13:57:03.848159 writer: Write/Writev failed, err: 2=no such file or directory. opcode: INTERRUPT PASS ok github.com/hanwen/go-fuse/fuse/test 1.960s https://github.com/hanwen/go-fuse/issues/252
-
Jakob Unterwurzacher authored
We used to read the directory already on OpenDir, which means that we missed changes in the directory between a user's open() and readdir() call. https://github.com/hanwen/go-fuse/issues/252
-
- 07 Feb, 2019 1 commit
-
-
Ed Schouten authored
For all operations that can be applied on file descriptors, we have special treatment to permit the File to be nil. In that case, operations are called against the Node object instead. This check currently seems missing from SetAttr(), causing invocations of the truncate(1) command line tool to cause a crash: panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x20 pc=0xa30d0d] goroutine 12 [running]: github.com/hanwen/go-fuse/fuse/nodefs.(*rawBridge).SetAttr(0xc00013ecc0, 0xc0003a8000, 0xc0003ba0f0, 0xa27b98) external/com_github_hanwen_go_fuse/fuse/nodefs/fsops.go:203 +0x58d github.com/hanwen/go-fuse/fuse.doSetattr(0xc0003a4000, 0xc0003ba000) external/com_github_hanwen_go_fuse/fuse/opcode.go:171 +0x64 github.com/hanwen/go-fuse/fuse.(*Server).handleRequest(0xc0003a4000, 0xc0003ba000, 0xc0003ba000) external/com_github_hanwen_go_fuse/fuse/server.go:431 +0x26b github.com/hanwen/go-fuse/fuse.(*Server).loop(0xc0003a4000, 0xc00000b101) external/com_github_hanwen_go_fuse/fuse/server.go:403 +0x18f created by github.com/hanwen/go-fuse/fuse.(*Server).readRequest external/com_github_hanwen_go_fuse/fuse/server.go:291 +0x2d8
-
- 05 Feb, 2019 1 commit
-
-
Han-Wen Nienhuys authored
-
- 04 Feb, 2019 3 commits
-
-
Jakob Unterwurzacher authored
Add a lock that prevents LOOKUP and FORGET from running concurrently. Locking at this level is a big hammer, but makes sure we don't return forgotten nodes to the kernel. Problems solved by this lock: https://github.com/hanwen/go-fuse/issues/168 https://github.com/rfjakob/gocryptfs/issues/322
-
Jakob Unterwurzacher authored
Helps to track where things went wrong when looking at debug logs.
-
Kirill Smelkov authored
- casting fuse.AttrOut.Attr to fuse.Attr is noop - casting fileSystemMount.options.Owner to fuse.Owner is noop - casting fuse.ReadIn.Context to fuse.Context is noop
-
- 01 Feb, 2019 1 commit
-
-
Han-Wen Nienhuys authored
-