winfsp / cgofuse

Cross-platform FUSE library for Go - Works on Windows, macOS, Linux, FreeBSD, NetBSD, OpenBSD
https://winfsp.dev
MIT License
511 stars 82 forks source link

Fuse3 support #50

Open xiaolong302 opened 3 years ago

xiaolong302 commented 3 years ago

Looks like right now it's using fuse version 2.8, is there a plan to support fuse3?

billziss-gh commented 3 years ago

The problem is that FUSE2 is the latest version of FUSE that is supported across all platforms that cgofuse supports.

Only Linux and Windows/WinFsp have support for FUSE3. Which platform are you interested in?

xiaolong302 commented 3 years ago

Linux > Window > Mac. Eventually we will have all three platforms.

billziss-gh commented 3 years ago

macOS does not support the FUSE3 API.

xiaolong302 commented 3 years ago

another question which is not related to fuse version. I am trying to understand how the application user space open call gets hook into fuse open method. I looked at kernal, it's using vfs_open which in term will send msg to the queue and the msg will be picked up by user space open method. I wrote a test problem to have concurrent 50 threads to open the SAME file, however I only noticed the fuse open call only got called once. I am wondering why it's not called 50 times for each thread. I looked at linux kernel, it doesn't seem there is any lock to prevent that.

ghz-max commented 3 years ago

@billziss-gh FUSE2 is EOL. I would be really interested in a fuse3 port.

What could decide you to port it? I can't help you with C, how about sponsoring it?

billziss-gh commented 3 years ago

@ghz-gehtz

FUSE2 is the only cross-platform user-mode file system layer today. Even on Linux many distros did not include FUSE3 until recently.

I agree that the porting work to FUSE3 will have to be done eventually, even if it is only for Linux. The work should be done in such a way as to support both old (FUSE2) and new (FUSE3) distros. Even more importantly, the work should be done in a way as to not disrupt other (non-Linux) platforms.

This makes the work non-trivial and time-consuming.

In any case if you are serious about sponsoring such an effort, you can contact me directly: billziss at navimatics dot com. Please do note that I apply commercial development rates for commissioned work.

darthShadow commented 1 year ago

Hi @billziss-gh,

Did you get any chance to work on this? Would it help to setup some sort of crowdfunded bounty for this?

I also did find this recently, in case it helps in anyway: https://github.com/Azure/azure-storage-fuse/tree/main/component/libfuse

billziss-gh commented 1 year ago

@darthShadow I have not had the chance to look into FUSE3 support for cgofuse.

Has the adoption of FUSE3 on Linux distros reached the point where it makes this support necessary?

ghz-max commented 1 year ago

In ubuntu 22.04, fuse2 can be installed but a lot of things seem to break: https://askubuntu.com/a/1412529

https://github.com/AppImage/AppImageKit/wiki/FUSE#install-fuse

The latest version of libfuse 2 is from 2019 and there will be none after.

billziss-gh commented 1 year ago

It looks like we may have to update cgofuse to support FUSE3 on Linux. Ideally this should be done in a manner transparent to users of this package and it should support both FUSE2 and FUSE3 at runtime (whichever is present).

I am currently very busy, so if anyone wants to try this I can provide some guidance. Otherwise, it may be at least a few weeks (and possibly months) before I have the time to look into it myself.

darthShadow commented 1 year ago

Yeah, fuse2 doesn't work very well but libfuse2 still works fine so rclone linked via cgofuse works fine too.

emm1R commented 1 year ago

Any idea on the schedule on this?

jfantinhardesty commented 1 year ago

@billziss-gh Have you had a chance to take a look at this?