Skip to main content

pull_composefs_unified

Function pull_composefs_unified 

Source
async fn pull_composefs_unified(
    imgstore: &CStorage,
    storage_path: &str,
    repo: &Arc<Repository<Sha512HashValue>>,
    imgref: &ImageReference,
) -> Result<PullResult<Sha512HashValue>>
Expand description

Pull an image via unified storage: first into bootc-owned containers-storage, then from there into the composefs repository via cstor (zero-copy reflink/hardlink).

The caller provides:

  • imgstore: the bootc-owned CStorage instance (may be on an arbitrary mount point during install, or under /sysroot during upgrade)
  • storage_path: the absolute filesystem path to that containers-storage directory, so cstor and skopeo can find it (e.g. /mnt/sysroot/ostree/bootc/storage during install, or /sysroot/ostree/bootc/storage during upgrade)

This ensures the image is available in containers-storage for podman run while also populating the composefs repo for booting.