composefs_fsmount

Function composefs_fsmount 

Source
pub fn composefs_fsmount(
    image: OwnedFd,
    name: &str,
    basedir: impl AsFd,
    enable_verity: bool,
) -> Result<OwnedFd>
Expand description

Creates a composefs mount using overlayfs with an erofs image and base directory.

This mounts a composefs image by creating an overlayfs that layers the erofs image (as the lower layer) over a base directory (as the data layer). The overlayfs is configured with metacopy and redirect_dir enabled for composefs functionality.

§Arguments

  • image - File descriptor for the composefs erofs image
  • name - Name for the mount source (appears as “composefs:{name}”)
  • basedir - File descriptor for the base directory containing the actual file data
  • enable_verity - Whether to require fs-verity verification for all files

§Returns

Returns a file descriptor for the mounted composefs filesystem, which can be used with mount_at() to attach it to a mount point.