From 822c84b8c17de89e521e0e43ac3f49b15399ead1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Jur=C4=8Da?= Date: Thu, 20 Feb 2025 11:07:30 +0100 Subject: [PATCH] Adjust available space check in AgingScenario to account for block size --- 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 ee4b81c..ba7cdd5 100644 --- a/source/scenarios/aging.cpp +++ b/source/scenarios/aging.cpp @@ -473,7 +473,7 @@ void AgingScenario::compute_probabilities(std::map& probabi // Handle case when available space is less than block size. If this happens, we can't write any more data. Even thought the drive isnt completely full. auto safe_margin = DataSize::fromString(getParameter("settings-safe-margin").get_string()); - if (fs_status.available <= safe_margin.get_value()) { + if (fs_status.available <= (safe_margin.get_value() + get_block_size().get_value())) { fs_status.available = 0; }