Skip to content

Fix sync_all on macos/ios - #60121

Merged
bors merged 1 commit into
rust-lang:masterfrom
davazp:fix-sync-all-macos
Apr 23, 2019
Merged

bors merged 1 commit into
rust-lang:masterfrom
davazp:fix-sync-all-macos

Conversation

@davazp

@davazp davazp commented Apr 19, 2019

Copy link
Copy Markdown
Contributor

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
Copy Markdown
Contributor

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 [DEPRECATED; DO NOT USE] label Apr 19, 2019
@KodrAus

KodrAus commented Apr 23, 2019 •

Copy link
Copy Markdown
Contributor

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

bors commented Apr 23, 2019

Copy link
Copy Markdown
Collaborator

📌 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

bors commented Apr 23, 2019

Copy link
Copy Markdown
Collaborator

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

@bors

bors commented Apr 23, 2019

Copy link
Copy Markdown
Collaborator

📌 Commit d602a6b has been approved by KodrAus

@bors

bors commented Apr 23, 2019

Copy link
Copy Markdown
Collaborator

⌛ 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

bors commented Apr 23, 2019

Copy link
Copy Markdown
Collaborator

☀️ 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 [DEPRECATED; DO NOT USE]

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants