MCPcopy Create free account
hub / github.com/cloud-hypervisor/cloud-hypervisor / complete_async

Method complete_async

block/src/request.rs:505–519  ·  view source on GitHub ↗
(
        &mut self,
        mem: &vm_memory::GuestMemoryMmap<B>,
    )

Source from the content-addressed store, hash-verified

503 }
504
505 pub fn complete_async<B: Bitmap + 'static>(
506 &mut self,
507 mem: &vm_memory::GuestMemoryMmap<B>,
508 ) -> Result<(), Error> {
509 for aligned_op in self.aligned_operations.drain(..) {
510 // We need to perform the copy after the data has been read inside
511 // the aligned buffer in case we're reading data in.
512 if self.request_type == RequestType::In {
513 mem.write_slice(aligned_op.as_bytes(), aligned_op.data_addr())
514 .map_err(Error::GuestMemory)?;
515 }
516 }
517
518 Ok(())
519 }
520
521 #[inline]
522 pub fn data_descriptors(

Callers 1

Calls 2

as_bytesMethod · 0.80
data_addrMethod · 0.80

Tested by

no test coverage detected