diff --git a/src/engine/strat_engine/pool/inspection.rs b/src/engine/strat_engine/pool/inspection.rs index ab2bfd6911..01ac2b7c52 100644 --- a/src/engine/strat_engine/pool/inspection.rs +++ b/src/engine/strat_engine/pool/inspection.rs @@ -10,7 +10,10 @@ use std::{ use devicemapper::Sectors; use crate::{ - engine::{strat_engine::serde_structs::PoolSave, types::DevUuid}, + engine::{ + strat_engine::serde_structs::PoolSave, + types::{DevUuid, ValidatedIntegritySpec}, + }, stratis::{StratisError, StratisResult}, }; @@ -535,7 +538,9 @@ impl fmt::Display for FlexDevice { } // Calculate map of device UUIDs to data device representation from metadata. -fn data_devices(metadata: &PoolSave) -> StratisResult> { +fn data_devices( + metadata: &PoolSave, +) -> StratisResult<(HashMap, Option)> { let data_tier_metadata = &metadata.backstore.data_tier; let data_tier_devs = &data_tier_metadata.blockdev.devs; @@ -570,7 +575,7 @@ fn data_devices(metadata: &PoolSave) -> StratisResult for ValidatedIntegritySpec { }) } } + +impl Display for ValidatedIntegritySpec { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + writeln!(f, "Allocate Superblock: {}", self.allocate_superblock)?; + writeln!(f, "Tag Specification: {}", self.tag_spec.as_ref())?; + writeln!(f, "Journal Size: {}", self.journal_size)?; + writeln!(f, "Block Size: {}", self.block_size) + } +}