Skip to content

Commit

Permalink
DLPX-81993 zoa panic in zettacache::block_allocator::SlabTrait>::max_…
Browse files Browse the repository at this point in the history
…size (openzfs#516)
  • Loading branch information
ahrens authored Jul 15, 2022
1 parent 41c9e57 commit 2c4dd58
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cmd/zfs_object_agent/zettacache/src/block_allocator/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1045,14 +1045,14 @@ impl BlockAllocatorBuilder {
disk_stats.free_bytes += slab.free_space();
disk_stats.alloc_bytes += slab.allocated_space();

if matches!(slab.inner, SlabEnum::Evacuating(_)) {
let evacuating = matches!(slab.inner, SlabEnum::Evacuating(_));
if evacuating {
evacuating_slabs.push(slab.id);
}

if let Some(&disk) = removing_disks.get(&slab_disk) {
noalloc_state.get_mut_or_default(disk).insert(slab.id);
disk_stats.noalloc_bytes += slab.free_space();
} else {
} else if !evacuating {
assert_eq!(disk_stats.noalloc_bytes, 0);
slabs_by_bucket
.entry(SlabBucketSize(slab.max_size()))
Expand Down

0 comments on commit 2c4dd58

Please sign in to comment.