Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enrich an error message #3470

Merged
merged 1 commit into from
Oct 18, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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