MCPcopy Create free account
hub / github.com/bootc-dev/bootc / check_disk_space_ostree

Function check_disk_space_ostree

crates/lib/src/deploy.rs:454–466  ·  view source on GitHub ↗

Verify there is sufficient disk space to pull an image into the ostree repo. Respects the repository's configured min-free-space threshold.

(
    repo: &ostree::Repo,
    image_meta: &PreparedImportMeta,
    imgref: &ImageReference,
)

Source from the content-addressed store, hash-verified

452/// Verify there is sufficient disk space to pull an image into the ostree repo.
453/// Respects the repository's configured min-free-space threshold.
454pub(crate) fn check_disk_space_ostree(
455 repo: &ostree::Repo,
456 image_meta: &PreparedImportMeta,
457 imgref: &ImageReference,
458) -> Result<()> {
459 let min_free = repo.min_free_space_bytes().unwrap_or(0);
460 check_disk_space_inner(
461 repo.dfd_borrow(),
462 image_meta.bytes_to_fetch,
463 min_free,
464 imgref,
465 )
466}
467
468/// Verify there is sufficient disk space to pull an image into the composefs store
469/// via the ostree unified-storage path (uses `PreparedImportMeta`).

Callers 2

install_containerFunction · 0.85
pullFunction · 0.85

Calls 1

check_disk_space_innerFunction · 0.85

Tested by

no test coverage detected