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.
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.
The change also speeds up normal ReadFileOps as a side effect because
it removes extra memory allocations.
* 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
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>
previously, this will fail if /mnt/file doesn't have an xattr:
```
listxattr("/mnt/file", 0x7fe8b3686830, 256) = -1 EIO (Input/output error)
```
We should be returning the actual size only if the input size is
zero. Related issue is if the filesystem returns ERANGE, we should
propagate that error instead of returning the actual size.
Replaced go-xattr usage with x/sys/unix so we can test this.
Tools like du and ls -l use this value to calculate the space used.
Force block size to 512 bytes for simplicity and compatibility with
Mac OS X which uses an older FUSE.