allows passing open /dev/fuse file descriptors so that the FUSE process
can run fully unprivileged. uses the /dev/fd/N mountpoint format from
libfuse3.
There are certain Kernel versions which do not send individual
Forget operations after they receive "not implemented" for Batch Forget.
One example is "5.4.0-110-generic" on Ubuntu 20.04. I am sure there are
plenty of others.
This leads to inode "leaks". Where reference counts are never decreased
and the inodes were left hanging around long after they are not needed
any more.
The best way to fix that was adding support for batch operations to the
lib. This way all users will be able to benefit from the batching
optimization.
Co-authored-by: Doychin Atanasov <doychin.atanasov@chaosgroup.com>
You can now run `./readbenchfs --mount_point dir --vectored` and then
`dd if=dir/test of=/dev/null iflag=direct bs=1M status=progress` to test
vectored read speed.
Results from my laptop (Linux 5.10):
1 core (GOMAXPROCS=1):
- Before vectored read patch: 2.1 GB/s
- Non-vectored read after vectored read patch: 2.1 GB/s
- Vectored read: 2.8 GB/s
All cores:
- Before vectored read patch: 3.0 GB/s
- Non-vectored read after vectored read patch: 3.3 GB/s
- Vectored read: 5.9 GB/s
Read requests can now take vectored responses from the filesystem
implementation and send them to FUSE device via the writev() system call.
This allows file systems to send data without copying it into the
library-provided buffer if the data is already in memory.
Closed-source macfuse 4.x has broken compatibility with osxfuse 3.x:
it passes an additional 64-bit field (flags) after RenameIn regardless
that we don't enable the support for RENAME_SWAP/RENAME_EXCL.
The simplest fix is just to check for the presence of all-zero flags
and strip them when they're present.
Co-authored-by: Vitaliy Filippov <vitalif@yourcmc.ru>
Fixes#109. In #102, the storage of the InMessage gets allocated every
time it's being read, which is expensive and caused issues like
https://github.com/GoogleCloudPlatform/gcsfuse/issues/563. So, this
change moves the allocation to its own function, called only once when
the struct is initialized before the reads.
macfuse 4.x turns out to be incompatible with the old mounting method where
you open the device by yourself and only supports the newer method where you
receive a file descriptor from `mount_macfuse` through a unix socket.
Co-authored-by: Vitaliy Filippov <vitalif@yourcmc.ru>
* Bump protocol version to min 7.28, max 7.31
* Increase read/write buffer size to 1MiB
* Add new fields to initOp
* Set FUSE_MAX_PAGES flag for init
* Lower min minor version to 19 for osxfuse
* Fix linux WriteSize test
There's no reason for this to be enforced on the user. For use-cases such as S3-backing, there are no "permissions" of such to base this on. Consequently, everything ends up being owned as root and making it far more difficult to use.
It should, however, be optional.
Expose PID as metadata in CreateFile, OpenFile and FlushFile operations
This will help us with kahing/goofys#273
Co-authored-by: Sai Teja Suram <pratap130492@gmail.com>
Co-authored-by: Sai Teja Suram <pts@avah.dev>
ListXattrOp behaves similarly to GetXattrOp in that you have to
return ERANGE in order to indicate the size of the attribute list,
so logging errors isn't warranted.
when user mount via fstab, we get '-o rw' implicitly, and under
directmount this _enabled_ MS_RDONLY, which is the opposite of what we
want
refs https://github.com/kahing/goofys/issues/483