This also
- move in use options (Opt) from vfsflags to vfscommon
- change os.FileMode to vfscommon.FileMode in parameters
- rework vfscommon.FileMode and add tests
The upstream library rclone uses for rclone mount no longer supports
freebsd. Not only is it broken, but it no longer compiles.
This patch disables rclone mount for freebsd.
However all is not lost for freebsd users - compiling rclone with the
`cmount` tag, so `go install -tags cmount` will install a working
`rclone mount` command which uses cgofuse and the libfuse C library
directly.
Note that the binaries from rclone.org will not have mount support as
we don't have a freebsd build machine in CI and it is very hard to
cross compile cmount.
See: https://github.com/bazil/fuse/issues/280Fixes#5843
This is possible now that we no longer support go1.12 and brings
rclone into line with standard practices in the Go world.
This also removes errors.New and errors.Errorf from lib/errors and
prefers the stdlib errors package over lib/errors.
It was discovered `rclone mount` (but not `rclone cmount`) cached
directories after rename which it shouldn't have done.
This caused IO errors when trying to access files in renamed
directories on bucket based file systems.
This turned out to be the kernel caching the directories as basil/fuse
sets their expiry time to 60s for some reason.
This fix invalidates the relevant kernel cache entries in the for the
directories which fixes the problem.
Fixes: #4977
See: https://forum.rclone.org/t/after-a-directory-renmane-using-mv-files-are-not-visible-any-longer/22797
It turns out that NFS calls mknod in FUSE even though we have create
defined. This was causing EIO errors when creating files.
This patch fixes it by implementing mknod. The way it is implemented
means that to write to an NFS file system you'll need --vfs-cache-mode
writes.
This limit was previously 4k set in 59026c4761 however leaf
names above 1k now produce an IO error.
WinFSP seems to have its own method for dropping too long file names
above 255 long.
Before this change, the current working directory could disappear
according to the Linux kernel.
This was caused by mount returning different nodes with the same
information in.
This change uses vfs.Node.SetSys to cache the information so we always
return the same node.
This flag allows the attribute caching in the kernel to be controlled.
The default is 0s - no caching - which is recommended for filesystems
which can change outside the control of the kernel.
Previously this was at the default meaning it was 60s for mount and 1s
for cmount. This showed strange effects when files changed on the
remote not via the kernel. For instance Caddy would serve corrupted
files for a while when serving from an rclone mount when a file
changed on the remote.
The purpose of this is to make it easier to maintain and eventually to
allow the rclone backends to be re-used in other projects without
having to use the rclone configuration system.
The new code layout is documented in CONTRIBUTING.