Skip to content

Commit

Permalink
Adjust available space check in AgingScenario to account for block size
Browse files Browse the repository at this point in the history
  • Loading branch information
janjurca committed Feb 20, 2025
1 parent fe88b39 commit 822c84b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion source/scenarios/aging.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,7 @@ void AgingScenario::compute_probabilities(std::map<std::string, double>& 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<DataUnit::B>::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;
}

Expand Down

0 comments on commit 822c84b

Please sign in to comment.