MCPcopy Create free account
hub / github.com/NVIDIA/OpenShell / rootfs_image_size_bytes

Function rootfs_image_size_bytes

crates/openshell-driver-vm/src/rootfs.rs:429–434  ·  view source on GitHub ↗
(source: &Path)

Source from the content-addressed store, hash-verified

427}
428
429fn rootfs_image_size_bytes(source: &Path) -> Result<u64, String> {
430 let used = directory_size_bytes(source)?;
431 let headroom = (used / 4).max(ROOTFS_IMAGE_MIN_HEADROOM_BYTES);
432 let size = (used + headroom).max(ROOTFS_IMAGE_MIN_SIZE_BYTES);
433 Ok(round_up_to_mib(size))
434}
435
436fn ext4_image_min_size_bytes(source: &Path) -> Result<u64, String> {
437 let used = directory_size_bytes(source)?;

Callers 1

Calls 2

directory_size_bytesFunction · 0.85
round_up_to_mibFunction · 0.85

Tested by

no test coverage detected