-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
cmount: add support for fuse3 #8579
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
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for doing this :-)
I don't like the duplicated mountOption
function though.
I'd suggest you set constant in your two fuse3 and !fuse3 file say isFuse3
and then use this to select what to do in mountOptions
in mount.go
. A compile time constant will be completely optimized by the compiler so this is nice and efficient and will be easier to maintain I think.
What do you think?
Great suggestion, that is a lot cleaner. I made those changes so it should be easier to read now. |
options = append(options, "-o", fmt.Sprintf("daemon_timeout=%d", int(time.Duration(opt.DaemonTimeout).Seconds()))) | ||
// The following options are not supported by fuse3 | ||
if !isFuse3 { | ||
options = append(options, "-o", fmt.Sprintf("max_readahead=%d", opt.MaxReadAhead)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems like it should be set in the init response but I don't see any way to set those for cgofuse. Same with maxwrite, which we default to 1MB for mount2, but skip here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I think that a change would need to be added to cgofuse since in fuse3 these options can no longer be specified on the command line.
What is the purpose of this change?
Adds support for fuse3 to the cmount command on Linux and NetBSD based on the recent release from cgofuse https://github.com/winfsp/cgofuse/releases/tag/v1.6.0. This is done by using the
fuse3
build tag which cgofuse uses to link to libfuse3. To build rclone with fuse3 you now can dogo build -tags=cmount,fuse3
Was the change discussed in an issue or in the forum before?
(#6632)
Checklist