/// Add a new bio covering the IO range into the provided bio desc. Returns
/// true if caller should continue checking more chunks.
///
/// offset: IO offset to the file start, inclusive.
/// end: IO end to the file start, exclusive.
/// chunk: a data chunk overlapping with the IO range.
/// desc: the targeting bio desc.
/// blksize: chunk size.
/// blob_id: chunk data blob id.
Add a new bio covering the IO range into the provided bio desc. Returns
true if caller should continue checking more chunks.

IO offset to the file start, inclusive.
end: IO end to the file start, exclusive.
chunk: a data chunk overlapping with the IO range.
desc: the targeting bio desc.
blksize: chunk size.
blob_id: chunk data blob id.
Add a new bio covering the IO range into the provided bio desc . Returns true if caller should continue checking more chunks . IO offset to the file start inclusive . end : IO end to the file start exclusive . chunk : a data chunk overlapping with the IO range . desc : the targeting bio desc . blksize : chunk size . blob_id : chunk data blob id .
pub(crate) fn add_chunk_to_bio_desc(
    offset: u64,
    end: u64,
    chunk: Arc<dyn RafsChunkInfo>,
    desc: &mut RafsBioDesc,
    blksize: u32,
    blob_id: String,
) -> bool {
    if offset >= (chunk.file_offset() + chunk.decompress_size() as u64) {
        return true;
    }
    if end <= chunk.file_offset() {
        return false;
    }
    let chunk_start = if offset > chunk.file_offset() {
        offset - chunk.file_offset()
    } else {
        0
    };
    let chunk_end = if end < (chunk.file_offset() + chunk.decompress_size() as u64) {
        end - chunk.file_offset()
    } else {
        chunk.decompress_size() as u64
    };
    let bio = RafsBio::new(
        chunk,
        blob_id,
        chunk_start as u32,
        (chunk_end - chunk_start) as usize,
        blksize,
    );
    desc.bi_size += bio.size;
    desc.bi_vec.push(bio);
    true
}
pub ( crate ) fn add_chunk_to_bio_desc ( offset : u64 , end : u64 , chunk : Arc < dyn RafsChunkInfo > , desc : & mut RafsBioDesc , blksize : u32 , blob_id : String , ) -> bool { if offset >= ( chunk . file_offset ( ) + chunk . decompress_size ( ) as u64 ) { return true ; } if end <= chunk . file_offset ( ) { return false ; } let chunk_start = if offset > chunk . file_offset ( ) { offset - chunk . file_offset ( ) } else { 0 } ; let chunk_end = if end < ( chunk . file_offset ( ) + chunk . decompress_size ( ) as u64 ) { end - chunk . file_offset ( ) } else { chunk . decompress_size ( ) as u64 } ; let bio = RafsBio :: new ( chunk , blob_id , chunk_start as u32 , ( chunk_end - chunk_start ) as usize , blksize , ) ; desc . bi_size += bio . size ; desc . bi_vec . push ( bio ) ; true }
Add a new bio covering the IO range into the provided bio desc.
Add a new bio covering the IO range into the provided bio desc .
offset
u64
end
u64
chunk
Arc<dyn RafsChunkInfo>
desc
&mut RafsBioDesc
blksize
u32
blob_id
String