Skip to content

(0.48) Use fallocate instead of ftruncate #215

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

Merged
merged 1 commit into from
Oct 22, 2024

Conversation

babsingh
Copy link
Contributor

Even if the ftruncate() system call succeeds, this does not guarantee that the underlying filesystem has enough free blocks to support whatever increase in file size that was requested. This can cause SIGBUS errors if writes are attempted in the file.

The fallocate() call does guarantee that there is enough space available.

Fixes: eclipse-openj9/openj9#20239

Backport of eclipse-omr/omr#7484

Even if the ftruncate() system call succeeds, this does not guarantee
that the underlying filesystem has enough free blocks to support
whatever increase in file size that was requested. This can cause SIGBUS
errors if writes are attempted in the file.

The fallocate() call does guarantee that there is enough space
available.

Signed-off-by: Christian Despres <[email protected]>
@pshipton pshipton merged commit d10a4d5 into eclipse-openj9:v0.48.0-release Oct 22, 2024
1 check passed
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