pub fn apply_to_bootstrap(&mut self) -> Result<()> {
        let mut rs = RafsSuper {
            mode: RafsMode::Direct,
            digest_validate: true,
            ..Default::default()
        };

        rs.load(self.f_parent_bootstrap.as_mut().unwrap())?;

        let lower_compressor = rs.meta.get_compressor();
        if self.compressor != lower_compressor {
            return Err(einval!(format!(
                "Inconsistent compressor with the lower layer, current {}, lower: {}.",
                self.compressor, lower_compressor
            )));
        }

        // Reuse lower layer blob table,
        // we need to append the blob entry of upper layer to the table
        self.blob_table = rs.inodes.get_blob_table().as_ref().clone();

        // Build node tree of lower layer from a bootstrap file
        let mut tree = Tree::from_bootstrap(&rs)?;

        // Apply new node (upper layer) to node tree (lower layer)
        for node in &self.nodes {
            tree.apply(&node, true)?;
        }

        self.lower_inode_map.clear();
        self.upper_inode_map.clear();
        self.readahead_files.clear();
        self.build_rafs_wrap(&mut tree)?;

        Ok(())
    }
/// Apply new node (upper layer from filesystem directory) to
/// bootstrap node tree (lower layer from bootstrap file)
Apply new node (upper layer from filesystem directory) to
bootstrap node tree (lower layer from bootstrap file)
Apply new node ( upper layer from filesystem directory ) to bootstrap node tree ( lower layer from bootstrap file )
pub fn apply_to_bootstrap(&mut self) -> Result<()> {
        let mut rs = RafsSuper {
            mode: RafsMode::Direct,
            digest_validate: true,
            ..Default::default()
        };
        rs.load(self.f_parent_bootstrap.as_mut().unwrap())?;
        let lower_compressor = rs.meta.get_compressor();
        if self.compressor != lower_compressor {
            return Err(einval!(format!(
                "Inconsistent compressor with the lower layer, current {}, lower: {}.",
                self.compressor, lower_compressor
            )));
        }
        // Reuse lower layer blob table,
        // we need to append the blob entry of upper layer to the table
        self.blob_table = rs.inodes.get_blob_table().as_ref().clone();
        // Build node tree of lower layer from a bootstrap file
        let mut tree = Tree::from_bootstrap(&rs)?;
        // Apply new node (upper layer) to node tree (lower layer)
        for node in &self.nodes {
            tree.apply(&node, true)?;
        }
        self.lower_inode_map.clear();
        self.upper_inode_map.clear();
        self.readahead_files.clear();
        self.build_rafs_wrap(&mut tree)?;
        Ok(())
    }
pub fn apply_to_bootstrap ( & mut self ) -> Result < ( ) > { let mut rs = RafsSuper { mode : RafsMode :: Direct , digest_validate : true , .. Default :: default ( ) } ; rs . load ( self . f_parent_bootstrap . as_mut ( ) . unwrap ( ) ) ? ; let lower_compressor = rs . meta . get_compressor ( ) ; if self . compressor != lower_compressor { return Err ( einval ! ( format ( " " self compressor lower_compressor ) ) ) ; } // Reuse lower layer blob table, // we need to append the blob entry of upper layer to the table self . blob_table = rs . inodes . get_blob_table ( ) . as_ref ( ) . clone ( ) ; // Build node tree of lower layer from a bootstrap file let mut tree = Tree :: from_bootstrap ( & rs ) ? ; // Apply new node (upper layer) to node tree (lower layer) for node in & self . nodes { tree . apply ( & node , true ) ? ; } self . lower_inode_map . clear ( ) ; self . upper_inode_map . clear ( ) ; self . readahead_files . clear ( ) ; self . build_rafs_wrap ( & mut tree ) ? ; Ok ( ( ) ) }
Apply new node (upper layer from filesystem directory) to
bootstrap node tree (lower layer from bootstrap file)
Apply new node ( upper layer from filesystem directory ) to bootstrap node tree ( lower layer from bootstrap file )
&mut self
&mut self