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
Merged

Fix sync_all on macos/ios #60121

merged 1 commit into from
Apr 23, 2019

Conversation

davazp
Copy link
Contributor

@davazp davazp 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.

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

Fixes rust-lang#55920
@rust-highfive
Copy link
Collaborator

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.

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Apr 19, 2019
@jonas-schievink jonas-schievink added the T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. label Apr 19, 2019
@KodrAus
Copy link
Contributor

KodrAus 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
Copy link
Contributor

bors commented Apr 23, 2019

📌 Commit d602a6b has been approved by KodrAus

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Apr 23, 2019
@bors
Copy link
Contributor

bors commented Apr 23, 2019

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

@bors
Copy link
Contributor

bors commented Apr 23, 2019

📌 Commit d602a6b has been approved by KodrAus

@bors
Copy link
Contributor

bors commented Apr 23, 2019

⌛ Testing commit d602a6b with merge 3bee49f...

bors added a commit that referenced this pull request Apr 23, 2019
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
Copy link
Contributor

bors commented Apr 23, 2019

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants