Skip to content

bmap-rs: Use sync_data instead of sync_all#119

Draft
obbardc wants to merge 1 commit intocollabora:mainfrom
obbardc:wip/obbardc/switch-to-sync-data
Draft

bmap-rs: Use sync_data instead of sync_all#119
obbardc wants to merge 1 commit intocollabora:mainfrom
obbardc:wip/obbardc/switch-to-sync-data

Conversation

@obbardc
Copy link
Copy Markdown
Contributor

@obbardc obbardc commented Apr 5, 2026

sync_all calls fsync which flushes both data and metadata to the device. For large image writes to slow storage (e.g. SD cards or USB drives) this blocks until all pages have been physically written which takes a LONG time. sync_data (fdatasync) flushes only the file data which is sufficient to ensure the written image is safe to use.

sync_all calls fsync which flushes both data and metadata to the device.
For large image writes to slow storage (e.g. SD cards or USB drives)
this blocks until all pages have been physically written which takes a
LONG time. sync_data (fdatasync) flushes only the file data which is
sufficient to ensure the written image is safe to use.

Signed-off-by: Christopher Obbard <christopher.obbard@linaro.org>
@obbardc
Copy link
Copy Markdown
Contributor Author

obbardc commented Apr 5, 2026

@sjoerdsimons small one for you to take a peek at :-)

@obbardc obbardc marked this pull request as draft April 10, 2026 14:28
@obbardc
Copy link
Copy Markdown
Contributor Author

obbardc commented Apr 18, 2026

Not sure if sync_data is the right call or not really.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant