Skip to content

Commit

Permalink
Enrich an error message
Browse files Browse the repository at this point in the history
Signed-off-by: mulhern <[email protected]>
  • Loading branch information
mulkieran committed Oct 18, 2023
1 parent 7576538 commit 066b9ff
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/engine/strat_engine/pool.rs
Original file line number Diff line number Diff line change
Expand Up @@ -479,12 +479,12 @@ impl StratPool {
/// Verifies that the filesystem operation to be performed is allowed to perform
/// overprovisioning if it is determined to be the end result.
fn check_overprov(&self, increase: Sectors) -> StratisResult<()> {
let cur_filesystem_size_sum = self.thin_pool.filesystem_logical_size_sum()?;
if !self.thin_pool.overprov_enabled()
&& self.thin_pool.filesystem_logical_size_sum()? + increase
> self.thin_pool.total_fs_limit(&self.backstore)
&& cur_filesystem_size_sum + increase > self.thin_pool.total_fs_limit(&self.backstore)
{
Err(StratisError::Msg(format!(
"Overprovisioning is disabled on this pool and increasing total filesystems size by {increase} would result in overprovisioning"
"Overprovisioning is disabled on this pool and increasing total filesystem size ({cur_filesystem_size_sum}) by {increase} would result in overprovisioning"
)))
} else {
Ok(())
Expand Down

0 comments on commit 066b9ff

Please sign in to comment.