pub fn update(&self, r: &mut RafsIoReader, conf: RafsConfig) -> Result<()> {
        info!("update");
        if !self.initialized {
            warn!("Rafs is not yet initialized");
            return Err(enoent!("Rafs is not yet initialized"));
        }

        // step 1: update sb.
        // No lock is needed thanks to ArcSwap.
        self.sb.update(r).map_err(|e| {
            error!("update failed due to {:?}", e);
            e
        })?;

        info!("update sb is successful");

        // step 2: update device (only localfs is supported)
        self.device.update(
            conf.device,
            self.sb.meta.get_compressor(),
            self.sb.meta.get_digester(),
        )?;
        info!("update device is successful");

        Ok(())
    }
/// update backend meta and blob file.
update backend meta and blob file.
update backend meta and blob file .
pub fn update(&self, r: &mut RafsIoReader, conf: RafsConfig) -> Result<()> {
        info!("update");
        if !self.initialized {
            warn!("Rafs is not yet initialized");
            return Err(enoent!("Rafs is not yet initialized"));
        }
        // step 1: update sb.
        // No lock is needed thanks to ArcSwap.
        self.sb.update(r).map_err(|e| {
            error!("update failed due to {:?}", e);
            e
        })?;
        info!("update sb is successful");
        // step 2: update device (only localfs is supported)
        self.device.update(
            conf.device,
            self.sb.meta.get_compressor(),
            self.sb.meta.get_digester(),
        )?;
        info!("update device is successful");
        Ok(())
    }
pub fn update ( & self , r : & mut RafsIoReader , conf : RafsConfig ) -> Result < ( ) > { info ! ( " " ) ; if ! self . initialized { warn ! ( " " ) ; return Err ( enoent ! ( " " ) ) ; } // step 1: update sb. // No lock is needed thanks to ArcSwap. self . sb . update ( r ) . map_err ( | e | { error ! ( " " e ) ; e } ) ? ; info ! ( " " ) ; // step 2: update device (only localfs is supported) self . device . update ( conf . device , self . sb . meta . get_compressor ( ) , self . sb . meta . get_digester ( ) , ) ? ; info ! ( " " ) ; Ok ( ( ) ) }
update backend meta and blob file.
update backend meta and blob file .
&self
r
&mut RafsIoReader
conf
RafsConfig
&self
r
&mut RafsIoReader
conf
RafsConfig