fluiday / macfuse

Automatically exported from code.google.com/p/macfuse
Other
0 stars 0 forks source link

macfuse never sends FUSE_FLUSH messages #141

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
MacFuse does not send synchronous flush messages when closing a file (the
release message is sent after the fact).  This makes it impossible to write
file systems with close-to-open caching semantics.  I think the fix is not
hard -- in fuse_vnop_close right before checking open_count == 0 at the
bottom, do a synchronous FUSE_FLUSH message.  It needs to be synchronous so
that the close (or dup2) system call does not return until the flush has
been processed.  I don't think it's okay to put the flush inside the
if(...) { cluster_push() }, because direct_io would bypass that check.

Original issue reported on code.google.com by russ...@gmail.com on 5 Apr 2007 at 2:37

GoogleCodeExporter commented 9 years ago
If you have a file system that depends on/uses FUSE_FLUSH, can you try out the 
latest svn source tree? It has 
FUSE_FLUSH, and also direct_io for reads/writes.

Original comment by si...@gmail.com on 6 Apr 2007 at 10:19

GoogleCodeExporter commented 9 years ago
Looks great, thanks.

Original comment by russ...@gmail.com on 6 Apr 2007 at 2:58

GoogleCodeExporter commented 9 years ago
Added in the source tree. Should be in the next release.

Original comment by si...@gmail.com on 6 Apr 2007 at 3:04