From 399871677a851880f417f10a769d8fcd0f98e6d6 Mon Sep 17 00:00:00 2001 From: Matt Keeter Date: Mon, 30 Oct 2023 14:53:57 -0400 Subject: [PATCH] Add some assertions --- downstairs/src/extent_inner_raw.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/downstairs/src/extent_inner_raw.rs b/downstairs/src/extent_inner_raw.rs index a3079febb..eeb0d28a0 100644 --- a/downstairs/src/extent_inner_raw.rs +++ b/downstairs/src/extent_inner_raw.rs @@ -541,6 +541,8 @@ impl RawInner { ) -> Result<(), CrucibleError> { let layout = RawLayout::new(def.extent_size()); let block_count = layout.block_count() as usize; + assert_eq!(block_count, def.extent_size().value as usize); + assert_eq!(block_count, ctxs.len()); file.set_len(layout.file_size())?; layout.write_context_slots_contiguous(