From 1ff3f18421e7814f9b244fd133114070b139a511 Mon Sep 17 00:00:00 2001 From: mulhern Date: Thu, 8 Aug 2024 14:50:17 -0400 Subject: [PATCH] Fix again --- src/bin/utils/predict_usage.rs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/bin/utils/predict_usage.rs b/src/bin/utils/predict_usage.rs index dc86162183..9a1008eee1 100644 --- a/src/bin/utils/predict_usage.rs +++ b/src/bin/utils/predict_usage.rs @@ -177,11 +177,9 @@ impl V2usage { let stratis_avail_sizes = device_sizes .iter() .map(|&s| { - (*s).checked_sub(*self.raid_metadata_alloc) - .and_then(|r| { - r.checked_sub(*integrity_meta_space(s - self.stratis_metadata_alloc)) - }) - .and_then(|r| r.checked_sub(*self.stratis_metadata_alloc)) + (*s).checked_sub(*self.stratis_metadata_alloc) + .and_then(|r| r.checked_sub(*integrity_meta_space(s))) + .and_then(|r| r.checked_sub(*self.raid_metadata_alloc)) .map(Sectors) .ok_or_else(|| { Box::new(PredictError(