Skip to main content

Crate starnix_modules_erofs

Crate starnix_modules_erofs 

Source
Expand description

EROFS (Enhanced Read-Only File System) module for Starnix.

Supports two mounting modes:

  1. In-process driver-mapped mode: When the backing file supports FileOps::get_file_token (e.g., an EROFS image stored in an Fxblob package blob, mounted directly or via a loop device / dm-verity) and fuchsia.storage.mapping.FileMapper is available, Starnix parses EROFS metadata in-process using erofs::ErofsFilesystem and creates pager-backed file VMOs through a child MapperSession (erofs::VolumeMapper). This avoids per-operation FIDL round-trips to an external filesystem component while keeping zx::Pager out of starnix_kernel so container suspend cannot freeze pager threads and deadlock.
  2. Out-of-process component fallback: When FileMapper is unavailable, the source file does not provide a page-aligned FileToken, or FileMapper.OpenSession fails, Starnix falls back to the out-of-process fuchsia.erofs.Erofs component (Erofs.Serve) and mounts the served directory channel via RemoteFs.

Functionsยง

new_fs
Mounts an EROFS filesystem from options.source (with optional page-aligned fsoffset mount parameter), using in-process driver mapping via fuchsia.storage.mapping.FileMapper when available and falling back to the out-of-process fuchsia.erofs.Erofs component otherwise.