Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jacobsa-fuse
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
jacobsa-fuse
Commits
b2c33963
Commit
b2c33963
authored
Oct 16, 2016
by
Aaron Jacobs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update state around "close without msyc" behavior on OS X.
parent
d66bad87
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
11 deletions
+6
-11
fuseops/ops.go
fuseops/ops.go
+3
-2
samples/flushfs/flush_fs_test.go
samples/flushfs/flush_fs_test.go
+3
-9
No files found.
fuseops/ops.go
View file @
b2c33963
...
...
@@ -696,9 +696,10 @@ type SyncFileOp struct {
// * On OS X, if a user modifies a mapped file via the mapping before
// closing the file with close(2), the WriteFileOps for the modifications
// may not be received before the FlushFileOp for the close(2) (cf.
// http://goo.gl/kVmNcx).
// https://github.com/osxfuse/osxfuse/issues/202). It appears that this may
// be fixed in osxfuse 3 (cf. https://goo.gl/rtvbko).
//
// * However,
even on OS X you
can arrange for writes via a mapping to be
// * However,
you safely
can arrange for writes via a mapping to be
// flushed by calling msync(2) followed by close(2). On OS X msync(2)
// will cause a WriteFileOps to go through and close(2) will cause a
// FlushFile as usual (cf. http://goo.gl/kVmNcx). On Linux, msync(2) does
...
...
samples/flushfs/flush_fs_test.go
View file @
b2c33963
...
...
@@ -605,19 +605,13 @@ func (t *NoErrorsTest) Mmap_NoMsync_MunmapBeforeClose() {
ExpectThat
(
t
.
getFlushes
(),
ElementsAre
())
ExpectThat
(
t
.
getFsyncs
(),
ElementsAre
())
// Close the file. We should see a flush. On Darwin, this will contain out of
// date contents (cf. https://github.com/osxfuse/osxfuse/issues/202).
// Close the file. We should see a flush with up to date contents.
err
=
t
.
f1
.
Close
()
t
.
f1
=
nil
AssertEq
(
nil
,
err
)
if
isDarwin
{
ExpectThat
(
t
.
getFlushes
(),
ElementsAre
(
"taco"
))
ExpectThat
(
t
.
getFsyncs
(),
ElementsAre
())
}
else
{
ExpectThat
(
t
.
getFlushes
(),
ElementsAre
(
"paco"
))
ExpectThat
(
t
.
getFsyncs
(),
ElementsAre
())
}
ExpectThat
(
t
.
getFlushes
(),
ElementsAre
(
"paco"
))
ExpectThat
(
t
.
getFsyncs
(),
ElementsAre
())
}
func
(
t
*
NoErrorsTest
)
Mmap_NoMsync_CloseBeforeMunmap
()
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment