Hyper.SuidHelper.ThinDump (Hyper v0.1.0)

Copy Markdown View Source

Extract a thin device's provisioned-range map from the pool's metadata, via the setuid helper's thin-dump tool (thin-provisioning-tools). Only valid while the pool's metadata snapshot is reserved — see Hyper.Node.Img.ThinPool.mappings/1, the sole intended caller.

Summary

Functions

Provisioned [begin, length] ranges of thin device dev_id in pool blocks, plus the pool block size in 512-byte sectors — the shape Hyper.SuidHelper.Blockcopy.copy/3 consumes verbatim as ranges_spec.

Types

err()

@type err() :: Hyper.SuidHelper.err()

Functions

mappings(meta_dev, dev_id)

@spec mappings(Path.t(), non_neg_integer()) ::
  {:ok, %{block_sectors: pos_integer(), ranges: [[non_neg_integer()]]}}
  | {:error, err()}

Provisioned [begin, length] ranges of thin device dev_id in pool blocks, plus the pool block size in 512-byte sectors — the shape Hyper.SuidHelper.Blockcopy.copy/3 consumes verbatim as ranges_spec.