pub struct TarFileSystem { /* private fields */ }Expand description
Read-only filesystem backed by the mount chunk of a .aospkg package.
The package container is header + manifest + mount index + mount.tar.
TarFileSystem::open decodes only the precomputed mount index and serves
reads from the uncompressed mount.tar chunk at mountBase + offset.
Extraction would create a duplicate host tree, thousands of physical inodes,
and a cleanup problem before reading the same bytes again.
File reads are an O(log n) index lookup plus a page-cache-backed memory
slice; metadata and directory listings come from the in-memory index. The
index must be pre-sorted by canonical path, and load performs a release-safe
adjacent-order check before any binary-search-dependent path can run. The
mmap is keyed by file identity and shared across VMs, so RSS follows the
pages actually touched rather than the full archive size. This open path is
on VM startup (configure_vm), so it must stay O(index decode): never parse
tar headers, read/hash the whole archive, or recover metadata from legacy
in-archive JSON here.
This filesystem is mounted only as a granular package-version leaf such as
/opt/agentos/pkgs/<pkg>/<version>. Managed commands and current aliases
are separate symlink leaf mounts, while parent directories stay writable
overlay directories so user-installed files can coexist with managed ones.
Implementations§
Trait Implementations§
Source§impl Clone for TarFileSystem
impl Clone for TarFileSystem
Source§fn clone(&self) -> TarFileSystem
fn clone(&self) -> TarFileSystem
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more