pub fn update_disk_image(&mut self, disk_image_path: String) -> result::Result<(), Error> {
        let disk_properties = DiskProperties::new(
            disk_image_path,
            self.is_read_only(),
            self.cache_type(),
            self.file_engine_type(),
        )?;
        self.disk = disk_properties;
        self.config_space = self.disk.virtio_block_config_space();

        // Kick the driver to pick up the changes.
        self.irq_trigger.trigger_irq(IrqType::Config).unwrap();

        METRICS.block.update_count.inc();
        Ok(())
    }
/// Update the backing file and the config space of the block device.
Update the backing file and the config space of the block device.
Update the backing file and the config space of the block device .
pub fn update_disk_image(&mut self, disk_image_path: String) -> result::Result<(), Error> {
        let disk_properties = DiskProperties::new(
            disk_image_path,
            self.is_read_only(),
            self.cache_type(),
            self.file_engine_type(),
        )?;
        self.disk = disk_properties;
        self.config_space = self.disk.virtio_block_config_space();
        // Kick the driver to pick up the changes.
        self.irq_trigger.trigger_irq(IrqType::Config).unwrap();
        METRICS.block.update_count.inc();
        Ok(())
    }
pub fn update_disk_image ( & mut self , disk_image_path : String ) -> result :: Result < ( ) , Error > { let disk_properties = DiskProperties :: new ( disk_image_path , self . is_read_only ( ) , self . cache_type ( ) , self . file_engine_type ( ) , ) ? ; self . disk = disk_properties ; self . config_space = self . disk . virtio_block_config_space ( ) ; // Kick the driver to pick up the changes. self . irq_trigger . trigger_irq ( IrqType :: Config ) . unwrap ( ) ; METRICS . block . update_count . inc ( ) ; Ok ( ( ) ) }
Update the backing file and the config space of the block device.
Update the backing file and the config space of the block device .
&mut self
disk_image_path
String