Skip to content

(0.48) Use fallocate instead of ftruncate - #215

Merged
pshipton merged 1 commit into
eclipse-openj9:v0.48.0-releasefrom
babsingh:v0.48.0-release
Oct 22, 2024
Merged

pshipton merged 1 commit into
eclipse-openj9:v0.48.0-releasefrom
babsingh:v0.48.0-release

Conversation

@babsingh

Copy link
Copy Markdown
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 <despresc@ibm.com>
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