pub fn flush_blocks(&mut self, raw_file: &mut QcowRawFile) -> io::Result<()> {
        // Write out all dirty L2 tables.
        for (table_index, block) in self.refblock_cache.iter_mut().filter(|(_k, v)| v.dirty()) {
            let addr = self.ref_table[*table_index];
            if addr != 0 {
                raw_file.write_refcount_block(addr, block.get_values())?;
            } else {
                return Err(std::io::Error::from_raw_os_error(EINVAL));
            }
            block.mark_clean();
        }
        Ok(())
    }
/// Flush the dirty refcount blocks. This must be done before flushing the table that points to
/// the blocks.
Flush the dirty refcount blocks. This must be done before flushing the table that points to
the blocks.
Flush the dirty refcount blocks . This must be done before flushing the table that points to the blocks .
pub fn flush_blocks(&mut self, raw_file: &mut QcowRawFile) -> io::Result<()> {
        // Write out all dirty L2 tables.
        for (table_index, block) in self.refblock_cache.iter_mut().filter(|(_k, v)| v.dirty()) {
            let addr = self.ref_table[*table_index];
            if addr != 0 {
                raw_file.write_refcount_block(addr, block.get_values())?;
            } else {
                return Err(std::io::Error::from_raw_os_error(EINVAL));
            }
            block.mark_clean();
        }
        Ok(())
    }
pub fn flush_blocks ( & mut self , raw_file : & mut QcowRawFile ) -> io :: Result < ( ) > { // Write out all dirty L2 tables. for ( table_index , block ) in self . refblock_cache . iter_mut ( ) . filter ( | ( _k , v ) | v . dirty ( ) ) { let addr = self . ref_table [ * table_index ] ; if addr != 0 { raw_file . write_refcount_block ( addr , block . get_values ( ) ) ? ; } else { return Err ( std :: io :: Error :: from_raw_os_error ( EINVAL ) ) ; } block . mark_clean ( ) ; } Ok ( ( ) ) }
Flush the dirty refcount blocks.
Flush the dirty refcount blocks .
&mut self
raw_file
&mut QcowRawFile
&mut self
raw_file
&mut QcowRawFile