Commit Graph

1500 Commits (master)

Author SHA1 Message Date
Vitaliy Filippov 8d4d89b65d Remove default os.ModeDevice in ConvertFileMode 2023-08-11 00:19:41 +03:00
Vitaliy Filippov efe41d860d Add READDIRPLUS support 2023-08-03 15:36:17 +03:00
Vitaliy Filippov a307ab844b Move convertChildInodeEntry, convertAttributes, convertExpirationTime to fuseops 2023-08-03 15:36:17 +03:00
Vitaliy Filippov 8312d62874 Use fuse_kernel_linux for Windows builds too 2023-06-09 11:47:15 +03:00
Vitaliy Filippov 2d9f6f635e Move Convert(File|Golang)Mode to fuseops 2023-06-04 18:42:22 +03:00
Vitaliy Filippov 8156bfadb4 Do not use syscall.O_ACCMODE 2023-06-04 18:41:56 +03:00
Vitaliy Filippov caac53a719 Add notification ops and conversions 2023-03-23 19:00:51 +03:00
Vitaliy Filippov 0f0f6e3670 Add PollOp 2023-03-22 18:50:52 +03:00
Vitaliy Filippov 062810a628 Add missing poll and notify request structures 2023-03-22 18:46:11 +03:00
Vitaliy Filippov c02e24f8ce Publish file mode conversion functions 2022-11-02 01:37:38 +03:00
Vitaliy Filippov 76071bba22 Add device number support 2022-11-02 01:36:28 +03:00
Vitaliy Filippov f54cd84222 Allow to use "zero-copy" writes 2022-11-01 20:56:02 +03:00
Eric Gouyer a4cd154343 add support for sticky bit on directories 2022-10-16 10:46:58 +02:00
Eric Gouyer 5e958a41f6 add support for retrieving UID GID PID for each fuseops, ala FUSE-C fuse_get_context() 2022-10-16 10:46:58 +02:00
Eric Gouyer 2681cd5156 add support for UID and GID in SetInodeAttributes 2022-10-16 10:46:58 +02:00
Doug Schaapveld 63437da750
Remove PID zero condition from sample memfs (#131) 2022-09-27 17:14:28 +02:00
Avi c62d7682a6
Add more debugging logs to the mounting process so we get more visibility for customer issues (#130) 2022-09-06 08:54:02 +02:00
Michael Stapelberg 4e67748df3 GitHub Actions: use Go 1.19 2022-09-06 08:43:12 +02:00
Michael Stapelberg 66d6bd9e7b gofmt with Go 1.19 2022-09-06 08:42:56 +02:00
Mei Gui 226fec2ce9
Pass OpenFlags for OpenFileOp followups (#129) 2022-07-26 09:34:00 +02:00
Mei Gui 9cc4ff0bc9
Pass OpenFlags for OpenFileOp (#127) 2022-07-18 13:15:27 +02:00
Vitaliy Filippov 13117049f3
Fallback from BatchForgetOp to a series of ForgetInodeOp if unsupported (#126)
Co-authored-by: Vitaliy Filippov <vitalif@yourcmc.ru>
2022-07-02 11:18:25 +02:00
Ben Linsay 21122235c7
allow passing open /dev/fuse file descriptors (#124)
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.
2022-05-31 22:22:54 +02:00
Doychin Atanasov 37d63df227
Add support for the FUSE_BATCH_FORGET operation (#123)
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>
2022-05-27 08:49:15 +02:00
Michael Stapelberg 468f285a46 update go.mod to pull in latest x/sys and x/net
Hopefully this fixes CI failures on mac
2022-05-27 08:33:30 +02:00
Michael Stapelberg 48612565d5 GitHub Actions: upgrade to latest stable version of Go 1.17 2022-03-03 09:31:36 +01:00
Michael Stapelberg 1c9fe7bc84 remove memclr/memmove entirely now that they are unused
This breaks with newer Go versions AFAICT, so it’s easier to just remove it entirely.
2022-03-03 09:28:15 +01:00
Vitaliy Filippov 84920d11dd Add vectored read to readbenchfs
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
2022-03-03 09:25:18 +01:00
Vitaliy Filippov c818f6216b Implement vectored read support
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.
2022-03-03 09:25:18 +01:00
Vitaliy Filippov da71c70600 Add ReadBenchFS to test linear read speed 2022-03-03 09:25:18 +01:00
Jakob Waibel c4197873da
Create mount_memfs sample (#121) 2022-02-14 20:12:19 +01:00
Vitaliy Filippov 108387eec1
Fix RenameOp compatibility with macfuse 4.x (#107)
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>
2022-01-30 14:39:55 +01:00
Jakob Waibel 1b9b09fd17
feat: Remove duplicate code in test (#119) 2022-01-09 15:54:07 +01:00
Jakob Waibel ffd6c474e8
docs: add missing “kernel” (#117) 2021-11-25 17:36:55 +01:00
Tetsuo Kiso 7c4418392f
Add gofmt CI step (#115) 2021-11-08 15:02:43 +01:00
Tetsuo Kiso c0eeb00f17
Delete .travis.yml (#114) 2021-11-07 18:19:45 +01:00
Tetsuo Kiso 233e2c82a4
Disable go test in CI (#113) 2021-11-07 18:19:20 +01:00
Tetsuo Kiso a621cd4bb0
Switch from Travis CI to GitHub Actions (#111)
Fixes #99.
2021-11-07 17:30:55 +01:00
Oliver Le Zhuang 8da59ba998
InMessage is initialized with a storage allocated before reads (#110)
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.
2021-10-28 23:41:51 +02:00
Vitaliy Filippov c75d3f26fc
Use newer mounting method (similar to fusermount) with macfuse 4.x (#106)
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>
2021-10-19 18:50:09 +02:00
mcdhee-msft 95fc8d1181
Add configuration to control async reads (#105) 2021-09-04 17:48:39 +02:00
Vitaliy Filippov 10d864429b
Add support for MacFuse >= 4.0 (#103)
Older `osxfuse` is unavailable for ARM-based MacOS

Co-authored-by: Vitaliy Filippov <vitalif@yourcmc.ru>
2021-08-18 08:55:49 +02:00
Andrew Gaul 7782064498
Calculate pageSize and bufSize at run-time (#102)
ARM-based macOS uses 16 KB pages instead of 4 KB.  Fixes
GoogleCloudPlatform/gcsfuse#548.
2021-08-11 21:31:10 +02:00
Oliver Le Zhuang 5d146b000c
Add support for RenameOp to debug messages (#101) 2021-08-05 08:22:33 +02:00
Kurt Jensen d82237972e
Add support for max_pages and increase to 256 (#96)
* 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
2021-08-02 23:29:12 +02:00
Michael Stapelberg 0630024b2b switch from assembly stubs to go:linkname comment
The go:linkname way works with Go 1.17 (with regabi), too.

Upstream did this in 2015 in
0b8d583320

See also https://sitano.github.io/2016/04/28/golang-private/ for more background
about both techniques.
2021-08-02 09:34:49 +02:00
Michael Stapelberg 8edaf5989f skip failing test for now 2021-08-02 09:27:30 +02:00
Vitaliy Filippov 9ad8359eec
Add handling of OpFsyncdir (#98)
Co-authored-by: Vitaliy Filippov <vitalif@yourcmc.ru>
2021-07-26 17:24:31 +02:00
Michael Stapelberg fac69e018f statfs sample: add missing locking 2021-06-06 20:54:41 +02:00
Michael Stapelberg e78223ecee Remove TestNonEmptyMountPoint; libfuse3 allows non-empty mountpoints
See also:
0bef21e854
2021-06-05 23:14:29 +02:00