Commit Graph

1485 Commits (63437da750bf1f6179125d0634a36634cf985b17)

Author SHA1 Message Date
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
Michael Stapelberg 7e446be212 fix memfs sample: use offset in fallocate call 2021-06-05 23:05:07 +02:00
Michael Stapelberg 6740b8faa5 travis: switch to Go 1.16 2021-06-05 22:53:39 +02:00
Michael Stapelberg 9c4c16288f declare a go module 2021-06-05 22:48:45 +02:00
Liri S 9677d03922
Added samples/roloopbackfs (#95) 2021-03-30 13:24:55 +02:00
Elliot Speck e0296dec95
Switch using Linux "default_permissions" to an optional parameter. (#94)
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.
2020-12-16 16:55:45 +01:00
Mei Gui 36e01f1b3a
Add pid in all fuse ops (#92)
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>
2020-10-28 08:51:23 +01:00
Brendan McMillion f8927095af
Set max file/folder name length. (#87) 2020-07-06 09:59:50 +02:00
Luke Alonso 05606cde59 Don't log ERANGE for ListXattrOp.
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.
2020-07-06 09:55:24 +02:00
Kane York ac0efb5a5a
posix_test: Reenable O_APPEND tests by using raw syscall (#88) 2020-07-05 10:42:22 +02:00
Brendan McMillion 9ed0e37421
Fix tests on MacOS. (#86) 2020-06-26 07:46:03 +02:00
Brendan McMillion 1ec76bd410
Add ARM support. (#85) 2020-06-26 07:45:43 +02:00
Michael Stapelberg 1d001802f7 add samples/mount_hello executable
This is a simple program to verify that the FUSE library itself works,
easier to run than the existing samples/mount with flushfs.
2020-04-23 21:11:18 +02:00
Michael Stapelberg b6e2754edf prefer fusermount3 (from FUSE 3), fall back to old fusermount
fixes #84
2020-04-23 21:10:43 +02:00
Ka-Hing Cheung ffe3eb03da
rw and ro were flipped (#80)
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
2020-03-23 08:51:36 +01:00
kungf 7d791d27a2
make fstype be composed of "fuse" and subtype (#77)
fix #76
2020-03-11 09:51:26 +01:00