pub async fn probe_all_config_objects(
        &self,
        metadata: &NexusMetaData,
    ) -> Result<Vec<NexusConfig>, MetaDataError> {
        let (bdev, hndl) = self.get_dev().context(NexusChildError {})?;
        let block_size = bdev.block_len() as u64;

        let mut list: Vec<NexusConfig> = Vec::new();

        for entry in &metadata.index {
            let blocks = entry.data_end - entry.data_start + 1;
            let mut buf =
                hndl.dma_malloc(blocks * block_size).context(ReadAlloc {
                    name: String::from("object"),
                })?;
            hndl.read_at(
                (metadata.header.self_lba + entry.data_start) * block_size,
                &mut buf,
            )
            .await
            .context(ReadError {
                name: String::from("object"),
            })?;
            list.push(NexusMetaData::read_config_object(&buf, &entry)?);
        }

        Ok(list)
    }
/// Read all config objects currently present on disk.
Read all config objects currently present on disk.
Read all config objects currently present on disk .
pub async fn probe_all_config_objects(
        &self,
        metadata: &NexusMetaData,
    ) -> Result<Vec<NexusConfig>, MetaDataError> {
        let (bdev, hndl) = self.get_dev().context(NexusChildError {})?;
        let block_size = bdev.block_len() as u64;
        let mut list: Vec<NexusConfig> = Vec::new();
        for entry in &metadata.index {
            let blocks = entry.data_end - entry.data_start + 1;
            let mut buf =
                hndl.dma_malloc(blocks * block_size).context(ReadAlloc {
                    name: String::from("object"),
                })?;
            hndl.read_at(
                (metadata.header.self_lba + entry.data_start) * block_size,
                &mut buf,
            )
            .await
            .context(ReadError {
                name: String::from("object"),
            })?;
            list.push(NexusMetaData::read_config_object(&buf, &entry)?);
        }
        Ok(list)
    }
pub async fn probe_all_config_objects ( & self , metadata : & NexusMetaData , ) -> Result < Vec < NexusConfig > , MetaDataError > { let ( bdev , hndl ) = self . get_dev ( ) . context ( NexusChildError { } ) ? ; let block_size = bdev . block_len ( ) as u64 ; let mut list : Vec < NexusConfig > = Vec :: new ( ) ; for entry in & metadata . index { let blocks = entry . data_end - entry . data_start + 1 ; let mut buf = hndl . dma_malloc ( blocks * block_size ) . context ( ReadAlloc { name : String :: from ( " " ) , } ) ? ; hndl . read_at ( ( metadata . header . self_lba + entry . data_start ) * block_size , & mut buf , ) . await . context ( ReadError { name : String :: from ( " " ) , } ) ? ; list . push ( NexusMetaData :: read_config_object ( & buf , & entry ) ? ) ; } Ok ( list ) }
Read all config objects currently present on disk.
Read all config objects currently present on disk .
&self
metadata
&NexusMetaData