Skip to content

Commit

Permalink
Add some assertions
Browse files Browse the repository at this point in the history
  • Loading branch information
mkeeter committed Oct 30, 2023
1 parent 854ac02 commit 3998716
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions downstairs/src/extent_inner_raw.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 3998716

Please sign in to comment.