Commit Graph

57 Commits (8d4d89b65d938d36d29b8832afe66be371855b67)

Author SHA1 Message Date
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 2d9f6f635e Move Convert(File|Golang)Mode to fuseops 2023-06-04 18:42:22 +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 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
Eric Gouyer a4cd154343 add support for sticky bit on directories 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
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
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

Co-authored-by: Doychin Atanasov <>
2022-05-27 08:49:15 +02: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 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 <>
2022-01-30 14:39:55 +01: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
Vitaliy Filippov 9ad8359eec
Add handling of OpFsyncdir (#98)
Co-authored-by: Vitaliy Filippov <>
2021-07-26 17:24:31 +02: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 <>
Co-authored-by: Sai Teja Suram <>
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
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 659cc51b20
convertAttributes: set S_ISUD bit from os.FileMode’s os.ModeSetuid (#58) 2019-09-19 08:49:04 +02:00
Srdjan Rilak 1b4a34cc7b Add CreateLink implementation 2017-11-24 14:36:15 +01:00
Ka-Hing Cheung d650fe34ba added tests and enhanced comments 2017-05-11 14:45:40 -07:00
Ka-Hing Cheung cbeaa55087 SetXattr support 2017-05-11 14:45:40 -07:00
Ka-Hing Cheung d20c4665c1 GetXattr/ListXattr implementation 2017-05-11 14:45:40 -07:00
Ka-Hing Cheung 8aade5c71f RemoveXattr implementation 2017-05-11 14:45:40 -07:00
Ben Sidhom 025868ecf2 Add direct io option for file operations 2017-05-09 07:47:28 +10:00
Aaron Jacobs 95e4d8b12e conversions.go: use the new buffer API. 2016-12-19 13:17:49 +11:00
Aaron Jacobs f5dc8c356e Added conversion support. 2015-12-14 23:34:09 +00:00
Andrew Gaul 1dcc6791f0 Report physical blocks used
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.
2015-10-22 18:57:08 -07:00
Aaron Jacobs 33a476cafc Attempt to do what the documentation now says. 2015-09-10 13:43:12 +10:00
Aaron Jacobs c96d308a7a Set f_frsize, fixing free space calculation by `df` on OS X. 2015-09-09 22:04:10 +10:00
Aaron Jacobs 5921525aab Removed special handling of statfs. 2015-09-09 09:49:54 +10:00
Aaron Jacobs 81de9fb6cc Made the message shrinking API less confusing. 2015-08-10 15:45:46 +10:00
Aaron Jacobs 9a7512aac0 Improved debug logging for unknownOp. 2015-08-06 16:25:43 +10:00
Aaron Jacobs 1e2d4abaf9 Don't send error responses to the kernel for forget and interrupt.
It's not expecting them.
2015-08-04 12:28:08 +10:00
Aaron Jacobs d205df3144 Don't return long error responses to ReadDir and ReadFile. 2015-08-04 12:21:34 +10:00
Aaron Jacobs a88ad8dbf2 Added support for KeepPageCache. 2015-07-29 05:53:46 +00:00
Aaron Jacobs ab0580a452 Fixed a very dumb bug. 2015-07-29 11:14:17 +10:00
Aaron Jacobs ea97708e20 Read directly into out messages for directories. 2015-07-29 11:03:27 +10:00
Aaron Jacobs bbb262ee48 Read directly into out messages for files. 2015-07-29 11:02:29 +10:00
Aaron Jacobs d903c709d3 Refactored allocation out OutMessage structs.
In preparation for allocating them up-front for ReadFile and ReadDir.
2015-07-29 10:47:41 +10:00
Aaron Jacobs c08043788a Fixed conversions.go. 2015-07-29 09:49:28 +10:00
Aaron Jacobs 384f32c2a3 Connection.kernelResponseForOp 2015-07-28 16:17:06 +10:00
Aaron Jacobs 0becfa3df2 Began fixing Connection. 2015-07-28 16:13:18 +10:00
Aaron Jacobs 5c332f767b Moved the kernel response functions to a more appropriate place. 2015-07-27 15:55:14 +10:00
Aaron Jacobs 95a6177c0c Fixed redundant internal op names. 2015-07-27 15:52:13 +10:00
Aaron Jacobs 3755e3c1a1 Fixed package fuse. 2015-07-27 15:43:41 +10:00