Comments (7)
have you tried adding the "direct_io" option to mount, https://godoc.org/github.com/hanwen/go-fuse/fuse#MountOptions?
from go-fuse.
Hi @hanwen
I tried direct_io
option, but cannot figure out why it doesn't work on my setup(Ubuntu 16.04):
conn := nodefs.NewFileSystemConnector(newFs.Root(), nil)
opts := &fuse.MountOptions{
MaxBackground: 12,
Options: []string{"direct_io"},
}
server, err := fuse.NewServer(conn.RawFS(), fs.GetMountDir(), opts)
fusermount reports:
/bin/fusermount: mount failed: Invalid argument
And if I remove direct_io
option it works.
from go-fuse.
try
func(fs *FS) Open(name string, flags uint32, context *fuse.Context) (nodefs.File, fuse.Status) {
f := ...
return &nodefs.WithFlags{
File: f,
FuseFlags: fuse.FOPEN_DIRECT_IO,
}, fuse.OK
}
from go-fuse.
Thanks @vChrysanthemum , I've figured that out lately, but it still doesn't work for me. I am sure kernel is handling the file in direct-io mode but it somehow hangs(soft lock up) due to waiting for a page to be locked. I am still investigating.
And I saw bazil/fuse
seems tested with direct_io already, so may want to give that a try as well.
from go-fuse.
Just a update: soft lock up caused by a kernel bug in FUSE interaction with loopback device. It exists after Linux v4.1. Details can be found at https://sourceforge.net/p/fuse/mailman/message/35276378/
from go-fuse.
having the same issue , can not support when using namazu with direct_io , it use this go-fuse lib.
@yasker
have you find out how to support this direct_io?
from go-fuse.
you can use directio by specifying the fuse.FOPEN_DIRECTIO flag from create or open methods.
from go-fuse.
Related Issues (20)
- FreeBSD not supported (vendor/github.com/hanwen/go-fuse/v2/fuse/types.go:557:2: undefined: Attr)? HOT 2
- Not working on WSL 2 HOT 1
- NodeReleaser not triggered HOT 14
- Callback when inode forgotten? HOT 4
- Errors from `(fs.DirStream).Next` of non-empty stream are obscured as `EIO` HOT 2
- bashisms in example/benchmark.sh HOT 1
- question: Why is FUSE_UNKNOWN_INO 4 bytes? HOT 1
- Can reads be async? HOT 10
- flock support HOT 4
- strange behaviour with pyinstaller executable HOT 1
- support Windows through dokany or winfsp HOT 4
- POSIX ACL HOT 5
- RawFileSystem.ReleaseDir is missing cancel parameter HOT 1
- RawFileSystem does not support chown/chmod? HOT 5
- Add option for writeback caching
- Conflict with Loopback OpenDir, SetLk, and FileHandles HOT 10
- Why context canceled and how to handle them HOT 1
- Support for FOPEN_CACHE_DIR HOT 10
- Export unmount function HOT 1
- Support for CAP_CACHE_SYMLINKS option HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from go-fuse.