-
Notifications
You must be signed in to change notification settings - Fork 86
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for FUSE3 on Linux #87
base: master
Are you sure you want to change the base?
Conversation
Great work with this PR. I would love to see a version of this PR incorporated into cgofuse. Unfortunately the PR as it currently stands makes cgofuse backwards incompatible with existing file systems. It is a goal of this project to maintain backwards compatibility. There are far too many file systems using cgofuse, both open source and closed source to do otherwise. The main reason for the incompatibility is the change in the
There may be other options to consider and I am happy to discuss them as long as we maintain backwards incompatibility. CC'ing @ncw who is (via rclone) one of the biggest open source cgofuse clients. |
Very nice. Rclone users have been requesting this 😄 I agree with Bill this shouldn't change the interfaces and break backwards compatibility though. Can we make the old interfaces work and do something sensible with fuse3. I guess it might require multiple calls to emulate something where a fh is passed in. Another alternative would be to only provide the new interface when the fuse3 tag is supplied. This would complicate the implementation though. Another alternative would be to declare a v2 for cgofuse. That would be the least extra code and would give a chance to clean up the Ex interfaces if we wanted. I thought the whole v2 thing was poorly thought through when I first read about it, but having been through it with some popular packages (eg ncw/swift ) it isn't too scary and works well. We would make a v1 branch which could receive minimal or no support (no support was what I chose) and then master becomes v2. |
I agree that that it would be better to not change the interface. Based on that feedback, I have added Fuse3 equivalent calls for Chmod, Chown, Utimens, Rename, and Readdir as this seemed to be the easiest to implement. Most filesystems on Fuse3 will not need to implement these methods as I doubt many will use the additional arguments so this means that we can still support Fuse2 and Fuse3 on the original interface by not passing the additional arguments from Fuse3. |
@billziss-gh Just a gentle ping on if the changes I to keep |
@jfantinhardesty sorry for that. I have been very busy with real-life events this last couple of weeks. I may be able to find some time to review over the next few days during the holidays. |
@jfantinhardesty I am currently working on this. I am using your PR as basis, so your commits will appear in the project's history. As discussed before the goal is to keep backwards compatibility and minimize the changes necessary to support FUSE3 on Linux/FreeBSD. I have split the I am basically done with this work and I am now contemplating with how to test the FUSE3 interface/implementation. At the very minimum I will test |
FYI this work is currently in the |
Please have a look at the changes at master...fuse3. With these changes all tests pass on Windows and Linux (both on FUSE2 and FUSE3). It is no longer possible to test on macOS as the GitHub macOS runners cannot load the macFUSE kext. A couple of TODO's:
|
@jfantinhardesty it would be helpful if you had a quick look to verify that these changes will work for you. |
Sorry, currently on vacation. I will have a chance to look at it in a day or two. |
No problem. I will wait to merge in, until you have confirmed that the changes work for you. In particular I am interested in any feedback you may have regarding ReaddirPlus under FUSE3, as we currently have no tests that check for this functionality. |
This pr adds support for FUSE3 on Linux and and makes a slight modification to the FileSystemBase interface to allow building for both FUSE2 and FUSE3. FUSE2 support is maintained and the default build option. To build with FUSE3 support you must use the
fuse3
build tag which will then link to fuse3.Additionally, some of the command line options changed in FUSE3 so direct_io and use_ino can no longer be set as command line options when starting a mount. These must be set in fuse_config so there are some additional functions introduced to set these options.
This also updates the CI/CD to test for FUSE2 and FUSE3 on Linux. It also only checsk the ability to build on MacOS since the old image is no longer available as a GitHub action and requires a restart to test the filesystem in GitHub actions.
This resolves #50.