From 3daccbae29927e94ec0e558f544341ee7fec9dc5 Mon Sep 17 00:00:00 2001 From: mulhern Date: Tue, 26 Nov 2024 21:54:00 -0500 Subject: [PATCH] Makd add and create consistent wrt. integrity meta allocation Calculate the integrity_meta_allocation the same whether the device is being used on creation or is being added to the pool later. Signed-off-by: mulhern --- src/engine/strat_engine/backstore/data_tier.rs | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/engine/strat_engine/backstore/data_tier.rs b/src/engine/strat_engine/backstore/data_tier.rs index 04fd6fc9b5..998df2c244 100644 --- a/src/engine/strat_engine/backstore/data_tier.rs +++ b/src/engine/strat_engine/backstore/data_tier.rs @@ -141,12 +141,7 @@ impl DataTier { .collect::>(); assert_eq!(bds.len(), uuids.len()); for bd in bds { - bd.alloc_int_meta_back(integrity_meta_space( - // NOTE: Subtracting metadata size works here because the only metadata currently - // recorded in a newly created block device is the BDA. If this becomes untrue in - // the future, this code will no longer work. - bd.total_size().sectors() - bd.metadata_size(), - )); + bd.alloc_int_meta_back(integrity_meta_space(bd.total_size().sectors())); } Ok(uuids) }