async fn probe_config_object(
        &self,
        metadata: &NexusMetaData,
        selected: u32,
    ) -> Result<NexusConfig, MetaDataError> {
        if selected >= metadata.header.used_entries {
            return Err(MetaDataError::IndexOutOfRange {
                selected,
                used: metadata.header.used_entries,
            });
        }

        let entry = &metadata.index[selected as usize];

        let (bdev, hndl) = self.get_dev().context(NexusChildError {})?;
        let block_size = bdev.block_len() as u64;

        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"),
        })?;

        Ok(NexusMetaData::read_config_object(&buf, entry)?)
    }
/// Read the selected config object from disk.
Read the selected config object from disk.
Read the selected config object from disk .
async fn probe_config_object(
        &self,
        metadata: &NexusMetaData,
        selected: u32,
    ) -> Result<NexusConfig, MetaDataError> {
        if selected >= metadata.header.used_entries {
            return Err(MetaDataError::IndexOutOfRange {
                selected,
                used: metadata.header.used_entries,
            });
        }
        let entry = &metadata.index[selected as usize];
        let (bdev, hndl) = self.get_dev().context(NexusChildError {})?;
        let block_size = bdev.block_len() as u64;
        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"),
        })?;
        Ok(NexusMetaData::read_config_object(&buf, entry)?)
    }
async fn probe_config_object ( & self , metadata : & NexusMetaData , selected : u32 , ) -> Result < NexusConfig , MetaDataError > { if selected >= metadata . header . used_entries { return Err ( MetaDataError :: IndexOutOfRange { selected , used : metadata . header . used_entries , } ) ; } let entry = & metadata . index [ selected as usize ] ; let ( bdev , hndl ) = self . get_dev ( ) . context ( NexusChildError { } ) ? ; let block_size = bdev . block_len ( ) as u64 ; 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 ( " " ) , } ) ? ; Ok ( NexusMetaData :: read_config_object ( & buf , entry ) ? ) }
Read the selected config object from disk.
Read the selected config object from disk .
&self
metadata
&NexusMetaData
selected
u32