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,
)
| 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. |
| 454 | pub(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`). |
no test coverage detected