/// Read a range of data from blob into the provided slice
Read a range of data from blob into the provided slice
Read a range of data from blob into the provided slice
fn read(&self, blob_id: &str, buf: &mut [u8], offset: u64) -> Result<usize> {
        let mut retry_count = self.retry_limit();
        loop {
            let ret = self.try_read(blob_id, buf, offset);
            match ret {
                Ok(size) => {
                    return Ok(size);
                }
                Err(err) => {
                    if retry_count > 0 {
                        warn!(
                            "Read from backend failed: {}, retry count {}",
                            err, retry_count
                        );
                        retry_count -= 1;
                    } else {
                        break Err(eio!(format!("Read from backend failed: {}", err)));
                    }
                }
            }
        }
    }
fn read ( & self , blob_id : & str , buf : & mut [ u8 ] , offset : u64 ) -> Result < usize > { let mut retry_count = self . retry_limit ( ) ; loop { let ret = self . try_read ( blob_id , buf , offset ) ; match ret { Ok ( size ) => { return Ok ( size ) ; } Err ( err ) => { if retry_count > 0 { warn ! ( " " err retry_count ) ; retry_count -= 1 ; } else { break Err ( eio ! ( format ( " " err ) ) ) ; } } } } }
Read a range of data from blob into the provided slice
Read a range of data from blob into the provided slice
&self
blob_id
&str
buf
&mut [u8]
offset
u64