diff --git a/src/bin/nydus-image/prefetch.rs b/src/bin/nydus-image/prefetch.rs deleted file mode 100644 index bf9df542279..00000000000 --- a/src/bin/nydus-image/prefetch.rs +++ /dev/null @@ -1,32 +0,0 @@ -use anyhow::{Context, Result}; -use nydus_api::ConfigV2; -use nydus_builder::{BuildContext, ConversionType}; -use nydus_rafs::metadata::RafsSuper; -use nydus_rafs::metadata::RafsVersion; -use std::result::Result::Ok; -use std::{path::Path, sync::Arc}; - -pub fn update_ctx_from_bootstrap( - ctx: &mut BuildContext, - config: Arc, - bootstrap_path: &Path, -) -> Result { - let (sb, _) = RafsSuper::load_from_file(bootstrap_path, config, false)?; - - ctx.blob_features = sb - .superblock - .get_blob_infos() - .first() - .ok_or_else(|| anyhow!("No blob info found in superblock"))? - .features(); - - let config = sb.meta.get_config(); - if config.is_tarfs_mode { - ctx.conversion_type = ConversionType::TarToRafs; - } - - ctx.fs_version = - RafsVersion::try_from(sb.meta.version).context("Failed to get RAFS version")?; - ctx.compressor = config.compressor; - Ok(sb) -}