Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix sync_all on macos/ios #60121

Merged
merged 1 commit into from Apr 23, 2019

Conversation

Projects
None yet
5 participants
@davazp
Copy link
Contributor

commented Apr 19, 2019

sync_all should flush all metadata in macos/ios, so it should call fcntl with the F_FULLFSYNC flag as sync_data does.

Note that without this sync_data performs more flushes than sync_all on macos/ios.

Fix sync_all on macos/ios
sync_all should flush all metadata in macos/ios, so it should call
fcntl with the F_FULLFSYNC flag as sync_data does.

Fixes #55920
@rust-highfive

This comment has been minimized.

Copy link
Collaborator

commented Apr 19, 2019

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @KodrAus (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

Please see the contribution instructions for more information.

@KodrAus

This comment has been minimized.

Copy link
Contributor

commented Apr 23, 2019

Thanks for the PR @davazp

While the standard library docs don't make any explicit guarantees about the behaviour of sync_all beyond ensuring data reaches the filesystem (not necessarily the device) I would find it surprising to learn that sync_data had different durability guarantees than sync_all. At least there's a bit of an assumption that sync_data is a subset of sync_all, so this looks good to me!

@bors r+

@bors

This comment has been minimized.

Copy link
Contributor

commented Apr 23, 2019

📌 Commit d602a6b has been approved by KodrAus

@bors

This comment has been minimized.

Copy link
Contributor

commented Apr 23, 2019

💡 This pull request was already approved, no need to approve it again.

  • There's another pull request that is currently being tested, blocking this pull request: #60140
@bors

This comment has been minimized.

Copy link
Contributor

commented Apr 23, 2019

📌 Commit d602a6b has been approved by KodrAus

@bors

This comment has been minimized.

Copy link
Contributor

commented Apr 23, 2019

⌛️ Testing commit d602a6b with merge 3bee49f...

bors added a commit that referenced this pull request Apr 23, 2019

Auto merge of #60121 - davazp:fix-sync-all-macos, r=KodrAus
Fix sync_all on macos/ios

`sync_all` should flush all metadata in macos/ios, so it should call `fcntl` with the `F_FULLFSYNC` flag as `sync_data` does.

Note that without this `sync_data` performs more flushes than `sync_all` on macos/ios.
@bors

This comment has been minimized.

Copy link
Contributor

commented Apr 23, 2019

☀️ Test successful - checks-travis, status-appveyor
Approved by: KodrAus
Pushing 3bee49f to master...

@bors bors added the merged-by-bors label Apr 23, 2019

@bors bors merged commit d602a6b into rust-lang:master Apr 23, 2019

2 checks passed

Travis CI - Pull Request Build Passed
Details
homu Test successful
Details

@davazp davazp deleted the davazp:fix-sync-all-macos branch Apr 23, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.