From 52bec0b09cc6757137ec856c4d8f7f9effe63dcd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Jur=C4=8Da?= Date: Mon, 3 Mar 2025 10:24:30 +0100 Subject: [PATCH] Fix fallocate call to use get_value() for new file size calculation --- source/scenarios/aging.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/scenarios/aging.cpp b/source/scenarios/aging.cpp index 41c8d06..cb41434 100644 --- a/source/scenarios/aging.cpp +++ b/source/scenarios/aging.cpp @@ -365,7 +365,7 @@ void AgingScenario::run() { #elif __linux__ || __unix__ || defined(_POSIX_VERSION) if (new_file_size > actual_file_size) { // Only expand, never shrink - if (fallocate(fd, 0, actual_file_size, new_file_size - actual_file_size) == -1) { + if (fallocate(fd, 0, actual_file_size, new_file_size.get_value() - actual_file_size) == -1) { perror("fallocate"); throw std::runtime_error("fallocate failed for file: " + random_file_path); }