Skip to content

[wasm] Fall back to a default chunk size when st_blksize is not available #835

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

Conversation

kateinoigakukun
Copy link
Member

The st_blksize field in stat struct is not provided by WASI, so we fall back to a default chunk size 4KB, which is a common page size. Otherwise, the below read and write loop won't progress.

@kateinoigakukun
Copy link
Member Author

@swift-ci test

…ilable

The `st_blksize` field in `stat` struct is not provided by WASI, so we
fall back to a default chunk size 4KB, which is a common page size.
@kateinoigakukun kateinoigakukun force-pushed the pr-fe104281f01ec42724d1bbf81bb7c870ff6b477b branch from bb01d84 to abd2b40 Compare August 8, 2024 18:40
@kateinoigakukun
Copy link
Member Author

@swift-ci test

@jmschonfeld jmschonfeld merged commit 41cbea8 into swiftlang:main Aug 8, 2024
3 checks passed
cthielen pushed a commit to cthielen/swift-foundation that referenced this pull request Nov 8, 2024
…ilable (swiftlang#835)

The `st_blksize` field in `stat` struct is not provided by WASI, so we
fall back to a default chunk size 4KB, which is a common page size.
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.

3 participants