Commit Graph

114 Commits (master)

Author SHA1 Message Date
Vitaliy Filippov efe41d860d Add READDIRPLUS support 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 8156bfadb4 Do not use syscall.O_ACCMODE 2023-06-04 18:41:56 +03:00
Vitaliy Filippov 062810a628 Add missing poll and notify request structures 2023-03-22 18:46:11 +03:00
Vitaliy Filippov f54cd84222 Allow to use "zero-copy" writes 2022-11-01 20:56:02 +03: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 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 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
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
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
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
Brendan McMillion 1ec76bd410
Add ARM support. (#85) 2020-06-26 07:45:43 +02: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 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 90d933551c fix formatting directives (to pass go test) 2019-09-16 18:28:45 +02:00
Ka-Hing Cheung d20c4665c1 GetXattr/ListXattr implementation 2017-05-11 14:45:40 -07:00
Aaron Jacobs cea04881bd buffer: generate decent code for OutMessage.Reset in Go 1.8 beta 2. 2016-12-19 14:41:59 +11:00
Aaron Jacobs bd496ea048 buffer: don't use memclr for the tiny header, whose size is known. 2016-12-19 13:58:09 +11:00
Aaron Jacobs 05b4591414 buffer: split runtime.s into pre- and post-Go 1.8 files.
Go 1.8 renamed this function; cf. golang/go@87e48c5.
2016-12-19 13:50:20 +11:00
Aaron Jacobs 0cd689f560 buffer: simplify storage of the header. 2016-12-19 13:14:54 +11:00
Aaron Jacobs d1ff915b0b OutMessage.OutHeader 2016-12-19 13:14:54 +11:00
Aaron Jacobs 849f53b080 OutMessage.ShrinkTo 2016-12-19 13:14:54 +11:00
Aaron Jacobs e03fa52bbf OutMessage.Grow 2016-12-19 13:14:54 +11:00
Aaron Jacobs d1ed507a5a OutMessage.GrowNoZero 2016-12-19 13:14:54 +11:00
Aaron Jacobs a7c1a1474a buffer_test: fix build errors. 2016-12-19 13:14:54 +11:00
Aaron Jacobs 0a22738acf OutMessage.Bytes 2016-12-19 13:14:21 +11:00
Aaron Jacobs 6f4af61734 buffer: consistently use 'm' for OutMessage receivers. 2016-12-19 13:14:21 +11:00
Aaron Jacobs 98a2b634bf OutMessage.Reset 2016-12-19 13:14:21 +11:00
Aaron Jacobs 9eb5e0793f buffer: define OutMessage's contents. 2016-12-19 13:14:21 +11:00
Aaron Jacobs 6e5247d16d buffer_test: make use of the new API. 2016-12-19 13:14:21 +11:00
Aaron Jacobs 0f6db15c59 buffer: give OutMessage's public API a makeover.
Use int where appropriate, fix up documentation, and clarify. Delete the
implementation where it will soon need to change.
2016-12-19 13:14:21 +11:00
Aaron Jacobs 10bc0e766c buffer_test: fix computation of the number of bytes cleared. 2016-12-19 13:14:05 +11:00
Aaron Jacobs 06b9c19b5e TestOutMessageHeader 2016-12-19 12:38:58 +11:00
Aaron Jacobs 78a1450a77 TestOutMessageShrinkTo 2016-12-19 12:32:22 +11:00
Aaron Jacobs 39f1f7c489 TestOutMessageAppendString 2016-12-19 12:31:08 +11:00
Aaron Jacobs c1af0dbdee TestOutMessageAppend 2016-12-19 12:30:42 +11:00
Aaron Jacobs e7b9860f41 buffer_test: expand the coverage of TestOutMessageGrow. 2016-12-19 12:26:59 +11:00
Aaron Jacobs 02e3f7895c buffer_test: expand the coverage of TestOutMessageReset. 2016-12-19 12:20:27 +11:00
Aaron Jacobs f250e46e83 buffer_test: add TODOs where more test coverage is necessary. 2016-12-19 12:16:51 +11:00
Aaron Jacobs ad65849346 Add a test for OutMessage.Grow. 2016-12-19 11:17:33 +11:00
Aaron Jacobs e329c0ef33 Add a test for OutMessage.Reset. 2016-12-19 11:17:33 +11:00
Aaron Jacobs 72fc9c96ca Add a benchmark for growing and shrinking.
This should better stress memclr.
2016-12-19 10:35:20 +11:00
Aaron Jacobs b87ffb528b Fix a bug in BenchmarkOutMessageReset.
I misunderstood what was being zeroed. Only the header is.
2016-12-19 10:26:19 +11:00
Aaron Jacobs d31e0a4eae Add a test for memclr. 2016-12-19 10:19:29 +11:00
Aaron Jacobs 92e3407014 Add benchmarks for OutMessage.Reset. 2016-12-19 09:46:08 +11:00
Aaron Jacobs 81de9fb6cc Made the message shrinking API less confusing. 2015-08-10 15:45:46 +10:00
Aaron Jacobs bbb262ee48 Read directly into out messages for files. 2015-07-29 11:02:29 +10:00