Comments (6)
So what to do about this? Some options:
- Do nothing. Don't make the "writes before flushes" guarantee to the file system implementer. This sucks, let's not do it.
- Process all requests serially. This is nice and simple, but could be very slow.
- Set up a barrier: wait for responses to all write requests for a given handle to complete before passing on a flush for that handle, potentially blocking the pipeline behind. Document this publicly.
- Change the API so we don't call blocking functions but rather just pass on requests, either as a channel or a read method or asynchronous function calls.
from fuse.
This can be made very easy to reproduce by sticking a time.Sleep(time.Second)
at the top of the bazilfuse.WriteRequest
case in server.go. It makes FlushFSTest.Mmap_MunmapBeforeClose
fail every time.
The same is not true of FlushFSTest.CloseReports_ReadWrite
, where it appears that each write(2) call is blocking on the fuse write request to finish. This surprises me; I thought writes were supposed to happen asynchronously via the page cache.
from fuse.
Closing the loop: I think perhaps the reason that we wait for write(2) is because we don't respond to Init
with bazilfuse.InitWritebackCache
, corresponding to FUSE_WRITEBACK_CACHE
in fuse_kernel.h
. This was apparently added in kernel 3.15, so I can't verify on my 3.13 machine.
from fuse.
Current favored solution:
- Kill the
FileSystem
interface. - Instead, have an
Op
interface with methodsContext() context.Context
andRespond(error)
. - Concrete implementations are structs with both request and response fields.
- Take this opportunity to put them in a
fuseops
sub-package. For example,fuseops.ReadOp
. - Have a
Connection
type that exposes a read method for a stream ofOp
s, directly reflecting/dev/fuse
. - Move existing method and struct comments onto the op structs.
Mount
function acceptsserveConn func(*Connection)
.- Kill
MountedFileSystem.WaitForReady
; instead just inMount
(and document this). - Audit package and README comments, update where necessary.
from fuse.
This is blocked by #4; we want tests that we can run many times to confirm we've fixed the issue.
from fuse.
All done with 336525b.
from fuse.
Related Issues (20)
- No debug information for RenameOp HOT 1
- InMessage initialization is in a wrong place
- WriteFile does not work in memfs as it is invoked py PID 0 HOT 5
- Operations frequently canceled when accessing a `gcsfuse` mount with a Go application HOT 2
- Writing offset is not in sequential order HOT 2
- alpine getdents64 lost direntries HOT 3
- Proposal to avoid memory copies between jacobsa FUSE library and application code HOT 4
- evaluate using sync.Pool over custom freelists HOT 3
- fuse mount with root failed HOT 7
- 1.8x slower compared to go-fuse HOT 12
- panic: convertInMessage: Can't grow for 262144-byte read HOT 6
- Shared mmap mapping results in -EACCES or -ENODEV HOT 3
- support open with openflag? HOT 3
- Not compatible to fuse3 HOT 1
- why the pagesize is always 4096? HOT 3
- Would you tell me fuseops error messages in detail ? HOT 1
- Compilation error on FreeBSD
- Shift enforced default permissions to an option. HOT 2
- Running tests sometimes hangs at the FUSE level HOT 6
- Switch from Travis to GitHub Actions 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 fuse.