Design 42 zfs-owns-zfs: A-30, the snapshots ledger in the ledger's own forms

This commit is contained in:
2026-11-13 00:53:58 +01:00
parent a5eae7aa0a
commit 27fd5ff860
@@ -98,3 +98,9 @@ settles it (`00-META/principles.md`), cited as "design 42 zfs-owns-zfs A-n". The
every value is valid, and each refused value is its own `config.refused`.
- **A-29** (§11, §18, met in develop; principle 3) The node's memory is read by the apply and given to the parse; a
memory that cannot be read refuses `arc-max` and `arc-min`, never guesses them.
- **A-30** (§21, §22, §26, A-19, A-20, met in develop; principles 1 and 7) The ledger `snapshots` uses the ledger's
own forms (ADR 0597) and nothing new: one type `snapshot`, its fields `dataset`, `name`, `kind` and `at`, all text;
an instance `snapshot/<kind>-<UTC stamp>-<dataset>`, the dataset's `/` written `~` (a character no ZFS name holds);
the operation `taken` with the effect `set-fields` on those four fields, and `removed` with the effect `remove`
naming no map, so the instance's state goes while its history keeps both operations; one index `by-dataset-kind` on
`dataset` and `kind`, read through `mesh/ledger.query`, the newest `at` among a kind's entries being its last.