Skip to main content

Module binding

Module binding 

Source
Expand description

Binding tables: longest-prefix substitution between guest and host paths, and the descriptors the path walk starts from.

Structs§

DirCache
O_PATH descriptors of canonical guest directories already walked, shared by every view of one supervisor.
Fs
The guest filesystem view: a root directory plus bind mounts.
Pin
The host side of the root or of a binding, held open once.

Constants§

DIR_CACHE_MAX 🔒
Directory descriptors kept in the cache before it is cleared wholesale.

Statics§

NEXT_VIEW_ID 🔒
Source of view identifiers, unique for the life of the supervisor.

Functions§

is_prefix
Whether prefix is path itself or a directory ancestor of it.
join_prefix
Concatenates a prefix and a /-leading (or empty) remainder without doubling slashes.
open_path 🔒
Opens a host path as an O_PATH|O_CLOEXEC descriptor with extra flags.
resolve_host 🔒
The real host path behind a binding or the root, symlinks resolved.
rest_after
The part of path after prefix, keeping its leading slash.

Type Aliases§

CacheKey 🔒
A cache entry’s key: the view’s id and the canonical guest directory.