The per-VM mutable rootfs. On start it activates (or reuses) the image's
read-only Img.Server, takes a reference on it, reads the composed device's
size, and asks the node ThinPool for a thin volume with that device as a
read-only external origin. blk_path/1 is the mutable host device the VM
boots from (staged into the jail by mknod from this path).
Mutable layers live in their own DynamicSupervisor, separate from the shared
read-only Img.Servers; the firecracker VM is handed this layer directly and
cannot be booted from a bare Hyper.Img.
Monitor-refcounted like Img.Server/Layer.Server: the VM supervisor holds
it; when the last holder dies it idle-reaps, destroying its thin volume in
terminate/2 and releasing the image (which, if it was the last holder, tears
down the RO chain in turn).
Summary
Functions
vm_ids of every live mutable layer on this node.
Returns a specification to start this module under a supervisor.
The volume's identity for forking: which image it serves, its thin name/id in the node pool, its device path, and the composed RO origin it reads through.
Release the calling process's hold on the writable volume.
Functions
@spec acquire(GenServer.server()) :: :ok
@spec acquire(GenServer.server(), pid()) :: :ok
@spec active_vm_ids() :: [Hyper.Vm.Id.t()]
vm_ids of every live mutable layer on this node.
@spec blk_path(GenServer.server()) :: Path.t()
Returns a specification to start this module under a supervisor.
See Supervisor.
@spec describe(GenServer.server()) :: %{ img_id: Hyper.Img.id(), thin_name: String.t(), thin_id: non_neg_integer(), blk_path: Path.t(), origin_dev: Path.t() }
The volume's identity for forking: which image it serves, its thin name/id in the node pool, its device path, and the composed RO origin it reads through.
@spec release(GenServer.server()) :: :ok
Release the calling process's hold on the writable volume.
The VM-supervisor holder is released via its monitor :DOWN, not this function.
@spec start_link(Hyper.Node.Img.Mutable.Opts.t()) :: GenServer.on_start()