The release step alone does not look at the target, so as the
operator's command it could release a live restore target and leave its
foreign references unprotected. It is now used only by the target's own
delete (its HEAD already deleting) and by OperatorReleaseDependent,
which reads the target first and releases only if it exists and is
deleted (HEAD deleting or deleted, or its name holding another volume
id) or no root in its live HEAD names a chunk of the source. A live
target still naming the source, one being created and one never created
(the restore could still create it) are refused, and the source is not
written. The package guard restricts the release's callers and requires
the operator's read of the target; the HEAD reader enumeration
classifies it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A volume delete runs in its order, each prefix safe and the whole
re-runnable: HEAD deleting (only with no holder, checked immediately
before, no open transaction and no snapshot with dependents), then this
volume released from every source's dependents, then its objects
deleted, then HEAD deleted. HEAD gains a state; from deleting on, every
holder transition, a claim and a removal are refused. A dependent is
released from a source by the target's volume id in one conditional
update, the delete's step and the operator's remove-dependent command.
The package guard allows DeleteVolume as the second remover and
requires its order (controls: the pool before the release, no holder
check); the stale-holder table now covers holder transitions only.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A VOLUME record carries a random volume id, and identities never rest on
a name that can repeat: HEAD carries the volume id; every chunk
reference in a segment carries its owner's volume id, which a read
checks against the owner's VOLUME before fetching (a volume created
again under the name is ErrIdentity) and the remover uses to tell its
own chunks; every dependent records the target's volume id and the
snapshot's root hash; and a holder is its epoch, server and the claim
id its claim writes into HEAD, so every transition refuses the same
server with another claim id. Encodings stay canonical and decoding
refuses anything else; the segment format is version 2. Nothing writes
these shapes to a store yet.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The reload used Load, which hides skipped corrupt records, and accepted
no record. The child stops after the rename without a power loss, so the
record is on disk: reloadExactly requires LoadWithSkips to return it
(deep-equal) with no skip, and its own controls refuse a corrupt, a
missing and a different record. The latch note and comments no longer
name a directory sync failure as a latch cause (that case fail-stops).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
RemoveUnreachable is the cleaning's removal step for one pool shard: for
the holder with its own clean(session) open, it deletes each candidate
chunk that no root in HEAD (current or any snapshot) names in this
volume's pool, and checks its own lease immediately before every delete.
HEAD is read once after BeginClean: no commit can add a root while the
cleaning is open, and a claim that voids it waits for this lease to end,
which the next check sees. An unreadable root or segment stops the pass
before any delete; a lapsed lease stops it before the next one; an open
snapshot refuses it.
The package guard now allows Delete/Remove names only in
RemoveUnreachable and requires a lease check before every delete in the
same block (controls: no check, check after the delete, one check
before the loop). The HEAD reader enumeration classifies its read, and
the ledger gains the removal row and the read path's row.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The rename is done, so a failed directory open or fsync leaves the
record's durability unknown. Reporting "failed" let a restart reload a
write its caller had acted on as failed. blockmaster now exits
(ExitDurabilityUnknown = 74, typed line) for every record type; the
restart reloads whatever survived. A close error after a good fsync is
reported written. Windows keeps its previous behaviour. The fault seam
names the step (open, fsync, close). INV-AUTH-PERSIST-BEFORE-PUBLISH-001
rewritten to match.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The child process does one Put with an injected directory fsync failure;
it must exit ExitDurabilityUnknown with the typed line and never return
to its caller. The parent reloads the store: the record or none.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
An unreadable directory or file was read as empty, so a partial inventory
could resolve as exactly one device; fs.Glob also dropped directory
errors during discovery. Every read error now refuses (the wait retries),
discovery lists nvme-subsystem and reads each subsysnqn, and the
literal-path fixture holds that path as an NQN so only the prefix guard
refuses it. Adds three partial-inventory controls.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The HEAD reader enumeration finds the layout package's one read path,
runTransition. Over an absent HEAD it refuses with ErrHeadAbsent and
writes nothing; a probe pins it with a store whose HEAD is absent.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
nvme list-subsys -o json does not list namespaces on every nvme-cli, so
the device never resolved on a real host although the kernel connected.
kzResolve now reads /sys/class like the CSI node (subsysnqn, controllers,
transport, serial, namespaces under the subsystem or the controller) with
the same refusals, and a timeout reports the last refusal.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
blockvolume refuses a non-loopback status bind; sw-block ops reach it
with --status-addr from the same host, so it uses headSzLoopbackAddr
like the NVMe listener.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>