Skip to content

Commit

Permalink
fio: check for proper maximum file size
Browse files Browse the repository at this point in the history
  • Loading branch information
Johannes Wünsche committed Jan 12, 2024
1 parent afb27d1 commit ed0988a
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions fio-haura/src/fio-engine-haura.c
Original file line number Diff line number Diff line change
Expand Up @@ -304,10 +304,8 @@ static int fio_haura_setup(struct thread_data *td) {
/* Haura needs some additional space to provide extra data like object
* pointers and metadata. This is more of a hack, but nonetheless. */
creat(td->files[idx]->file_name, 0644);
if (truncate(td->files[idx]->file_name, td->o.size + (50 * 1024 * 1024))) {
fprintf(
stderr,
"Could not retruncate file to provide enough storage for Haura.\n");
if (truncate(td->files[idx]->file_name, max(td->o.file_size_high, td->o.size) + (50 * 1024 * 1024))) {
fprintf(stderr,"Could not retruncate file to provide enough storage for Haura.\n");
}
}

Expand Down

0 comments on commit ed0988a

Please sign in to comment.