A HEAD is written by three store calls: the conditional update (only
through runTransition), the exclusive create, and the tombstone. Each now
takes a typed HeadWriteCause, one value per row of the HEAD writer
census, so a writer without a row does not compile. The transitions that
serve one row pass it; RunAbort, RunEndClean and RunCommit, which serve
several, take it from their caller. The layout store refuses a cause
outside the census, a first HEAD not written as create and a tombstone
not written as tombstone. No behaviour changes otherwise.
TestEveryHeadWriteIsACensusRow scans the production source: every HEAD
write names a census constant or forwards its function's cause, and
every row has a writer (both directions); it logs the writers by row.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review follow-up. The template unit takes the volume id from its
instance name, so a settings file cannot name another volume (a fourth
per-instance directive, kept by the drift test). /status/guests and its
schema say what it is: the counted frontends (NVMe/TCP, iSCSI) only; an
absent frontend is not served or not counted; a vanished host stays
counted until TCP closes; 0 is not proof that nothing uses the volume.
The endpoint test's callbacks use atomics.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
What volume start and volume stop need, before the commands.
/status/guests?volume=<v> reports the guests connected now through each
frontend served: NVMe/TCP hosts (live admin controllers) and iSCSI
initiators (Normal sessions past login; Discovery sessions do not count),
read at request time, and their sum.
deploy/systemd/sw-blockvolume@.service runs one volume per instance
from /etc/sw-block/volumes/<volume>.env with its own state directory;
apart from three per-instance directives it is sw-blockvolume.service,
and a test keeps the two the same.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Remove unnamed roots, segments and chunks through one conditional mark/delete writer. Resume chunk cursors after bounded passes; re-plan metadata first and retain the session initial root set through operator snapshot deletes. Add a local trigger of the existing snapshot schedule for qualification.
The ledger row for the identity rule this change keeps: one name, one
layout identity; no directory but the record's holds a live HEAD. Its
scope: only a refused restore's record (never left the creation phase)
is removed; a served volume's deleted name is never created again. A
guard test proves that name is refused for a plain create, the same
restore request and a new one, with no record and no filer write.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review follow-up. A fetch answered with anything but 200 (a 404 is
ordinary while a restore target hydrates) drains its body like a delete,
so its connection is reused. Close also closes the blob client's idle
connections, now that the client owns its transport. The idle pool size
is stated as a retention budget, not a limit on requests in flight.
Tests: 404 fetches reuse one connection; Close releases the idle
connection while the server stays up; the upload test forces waves of
eight overlapping requests and carries a default-pool control.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The writer census parses every production file and attributes each write
of ObjectsChecked to its receiver and method (only CASHead), with controls
for another method, a keyed literal and a multiple assignment. New
guards: a check passed in one session is not reused after an abort and a
new session at the same root; CommitPendingSnapshot looks up the root and
segments; the metadata-conflict retry looks up again without a passed
check and may reuse a passed check of the same pair.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
blockvolume's chunk layer holds the LayoutRemote inside closeBoundRemote
and layoutBoundRemote, so its assertion for the commit check failed and
the lookups stayed inside the 2 s HEAD update. closeBoundRemote now
forwards CheckCommit with the same binding as CASHead; a remote without it
passes, and its CAS checks inside. Tests go through the provider's attach,
check every optional interface the chunk layer asserts against the
wrapped remote, and cover a pre-check that finds a chunk missing.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The commit's object check (every new chunk, segment and root written by
the session, unmarked) ran inside the one HEAD update, which the chunk
layer bounds at 2 s; the work grows with the changed chunks, so it capped
the volume size. The chunk layer now asks the remote to run that check
with the cut's context, just before the CAS; the CAS then skips the
lookups only for exactly the session and root that passed. Any other CAS
(another root, another session, the snapshot commit) runs them inside as
before. The session stays open between the two, so no cleaning can begin.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>