Skip to content

Commit

Permalink
Fix for tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jbaublitz committed Mar 22, 2023
1 parent 8dca575 commit a71f0a1
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/engine/strat_engine/backstore/backstore.rs
Original file line number Diff line number Diff line change
Expand Up @@ -563,8 +563,10 @@ impl Backstore {
pub fn teardown(&mut self, pool_uuid: PoolUuid) -> StratisResult<()> {
let devs = list_of_backstore_devices(pool_uuid);
remove_optional_devices(devs)?;
self.data_tier.block_mgr.teardown()?;
Ok(())
if let Some(ref mut cache_tier) = self.cache_tier {
cache_tier.block_mgr.teardown()?;
}
self.data_tier.block_mgr.teardown()
}

/// Consume the backstore and convert it into a set of BDAs representing
Expand Down

0 comments on commit a71f0a1

Please sign in to comment.