Commit Graph

1459 Commits (10d864429bf700fbc4d711dc626886ee278b4701)

Author SHA1 Message Date
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
Michael Stapelberg 2f65426467 implement NoOpenSupport and NoOpendirSupport
See also:
7678ac5061
d7afaec0b5
d9a9ea94f7
2020-02-15 08:31:54 +01:00
Michael Stapelberg 7c2b569250 implement symlink caching 2020-02-15 08:04:53 +01:00
Michael Stapelberg ae5da07e4c
remove naked returns across the code base (#75)
fixes #73
2020-01-28 10:10:08 +01:00
Ka-Hing Cheung 4898d79241 plumb through Fd in setattr (#67)
this allows us to distinguish between truncate vs ftruncate
2019-12-11 09:49:03 +01:00
Ka-Hing Cheung e7bcad2083 fix getxattr and listxattr (#72)
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.
2019-12-11 09:41:37 +01:00
Ka-Hing Cheung 4ee1cf7f62 add support for fallocate (#66)
* Fallocate support

* use fallocate wrapper that works on darwin
2019-10-26 10:15:00 +02:00
Michael Stapelberg 081e9f4bc7
Merge pull request #59 from stapelberg/mount
try mounting without fusermount(1) first
2019-09-23 17:54:23 +02:00
Michael Stapelberg 53aac50a1c open /dev/fuse in blocking mode so the runtime does not use a poller
/dev/fuse is not pollable. Go ≥ 1.13 starts reporting this on Read().
2019-09-19 08:50:12 +02:00
Michael Stapelberg b71377f287 try mounting without fusermount(1) first
This requires root privileges or the CAP_SYS_ADMIN capability, but allows
supporting -o suid.
2019-09-19 08:50:12 +02:00
Michael Stapelberg 659cc51b20
convertAttributes: set S_ISUD bit from os.FileMode’s os.ModeSetuid (#58) 2019-09-19 08:49:04 +02:00
Michael Stapelberg cd3c1bb470 flush_fs_test: match another error message 2019-09-18 16:27:50 +02:00
Michael Stapelberg 3c60dc478a .travis.yml: pin to macOS 10.12 2019-09-18 16:16:40 +02:00
Michael Stapelberg fbd48a3771 fix/skip tests for Go 1.13
See https://golang.org/doc/go1.13#os for the corresponding change.
2019-09-16 18:43:37 +02:00
Michael Stapelberg 90d933551c fix formatting directives (to pass go test) 2019-09-16 18:28:45 +02:00
Michael Stapelberg bf89eeaf3e .travis.yml: upgrade to Go 1.13 2019-09-16 18:23:05 +02:00
Functionary Robot cd3959611b samples/memfs: fix errors found by vet 2018-04-17 15:43:21 +10:00
Aaron Jacobs 3b43406003
Merge pull request #39 from saracen/context
replace imports of "golang.org/x/net/context" with "context"
2018-02-08 06:26:42 +11:00
Arran Walker a43f6514bf .travis.yml: upgrade to Go 1.9.3. 2018-02-07 19:23:23 +00:00
Arran Walker 5ee7049312 replace imports of "golang.org/x/net/context" with "context" 2018-02-07 19:18:23 +00:00
Aaron Jacobs c4e473376f
Merge pull request #36 from sbg/feature/hard-links
Hard links implementation
2017-12-01 13:26:32 +11:00
Srdjan Rilak 4ee295e334 Add tests for hard link 2017-11-30 16:30:32 +01:00
Srdjan Rilak 1b4a34cc7b Add CreateLink implementation 2017-11-24 14:36:15 +01:00
Aaron Jacobs 88e3bc5ff0
Merge pull request #34 from inevity/mountsubtype
add fuse mount subtype to mountconfig
2017-11-03 15:29:20 +11:00
baul eba79bc989 add mount subtype documentation 2017-11-02 08:43:58 +08:00
baul 171218ed60 add fuse mount subtype to mountconfig 2017-11-01 18:17:45 +08:00
Ka-Hing Cheung 1ab97fb2eb handle forget inline instead of in goroutine
when we are under memory pressure, or echo 3 > /proc/sys/vm/drop_caches,
kernel can send us many forget ops at the same time if we have lots of
inodes in memory. Running them all in goroutines can lead to even more
memory usage and eventually OOM.
2017-10-11 07:44:47 +11:00