Skip to content
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

Fuse3 doesn't accept direct_io mount option #419

Closed
sunwire opened this issue May 17, 2019 · 4 comments
Closed

Fuse3 doesn't accept direct_io mount option #419

sunwire opened this issue May 17, 2019 · 4 comments

Comments

@sunwire
Copy link

sunwire commented May 17, 2019

Support for direct_io has been removed with this commit
8ee553d#diff-ea5d64ddacb25ba3b5f93f299b159d94
Now if I mount e.g. /proc/net from a remote machine (with fuse-sshfs) and try to read any file from this mount point, the reading always returns 0 bytes instead of the actual content.

To enable direct_io I have to add this code
FUSE_LIB_OPT("direct_io", direct_io, 1),
to the fuse.c file bellow line
static const struct fuse_opt fuse_lib_opts[] = {

Is it possible to restore this option for the end user?

@Nikratio
Copy link
Contributor

Thanks for the report! While libfuse no longer accept this as a command line option, filesystems like SSHFS can still selectively enable this in whatever way they want. So I'd suggest to request this as a feature in SSHFS instead (there were good reasons for not accepting this in libfuse anymore).

@DUOLabs333
Copy link

DUOLabs333 commented Mar 31, 2022

I have the same problem -- how would I add functionality back on the program side?

@sunwire
Copy link
Author

sunwire commented Apr 1, 2022

@DUOLabs333 This functionality has been added to sshfs libfuse/sshfs#173

@bsbernd
Copy link
Collaborator

bsbernd commented Apr 1, 2022

One can do it as in sshfs, set fi->direct_io in fuse_operations::{open,create} methods or set in fuse_operations::init fuse_config::direct_io

Personally I don't see why some options like these have been removed, as their are kernel-fuse options and file system implementation independent.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants