Skip to content

Conversation

@djs55
Copy link
Member

@djs55 djs55 commented Aug 2, 2016

The man page for fsync on OSX explains that it is insufficient to implement the desired semantics of flush i.e. that all written blocks have definitely hit the physical disk. Instead we must use fcntl(F_FULLFSYNC).

Fixes #49

djs55 added 2 commits August 2, 2016 17:53
The man page for `fsync` on OS X warns that it's not enough and doesn't
prevent arbitrary re-ordering of writes by the drive. This means that an
application taking care to write structures in a certain order bracketted by
calls to `flush` to maintain invariants will be disappointed by the behaviour
of `fsync`. Switch to `fcntl(F_FULLFSYNC)` as recommended by the manpage.

Signed-off-by: David Scott <dave@recoil.org>
Signed-off-by: David Scott <dave@recoil.org>
@coveralls
Copy link

Coverage Status

Coverage remained the same at 53.511% when pulling 8b8de87 on djs55:fsync into a652488 on mirage:master.

@coveralls
Copy link

coveralls commented Aug 2, 2016

Coverage Status

Coverage remained the same at 53.511% when pulling 0bb7d1b on djs55:fsync into a652488 on mirage:master.

Signed-off-by: David Scott <dave@recoil.org>
@coveralls
Copy link

Coverage Status

Coverage remained the same at 53.511% when pulling 13eb97a on djs55:fsync into a652488 on mirage:master.

@djs55 djs55 merged commit b284318 into mirage:master Aug 2, 2016
@djs55 djs55 deleted the fsync branch August 2, 2016 22:12
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

Successfully merging this pull request may close these issues.

2 participants