hydrate reads a block of each chunk the guest has not written

A read fetches its chunk only when the block read is not local; the
helper read each chunk's first block, which the ladder images write, so a
chunk whose first block the guest wrote was never filled (two chunks of
C3-kill stayed absent). It now reads each chunk's last block, which no
ladder image writes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
pingqiuandClaude Opus 5.5 committed 2026-11-26 04:25:14 -08:00
1 parent a4db4270b3
commit 2ba005c464
1 file changed
+5 -1
@@ -508,7 +508,11 @@ func (env *handoffEnv) hydrate(t *testing.T, target string) {
t.Helper()
b := env.hosts["n-"+target]
c := dialNVMe(t, b.nvme, plannedHandoffNQN)
for lba := uint64(0); lba <= ladderLastBlock; lba += ladderChunkBlocks {
// A read fetches its chunk only when the block read is not local: a
// block the guest wrote is served locally and fills nothing. So read
// each chunk's last block, which no ladder image writes (ladderImage
// writes offsets 0, 37, 74, ... in a chunk).
for lba := uint64(ladderChunkBlocks - 1); lba <= ladderLastBlock; lba += ladderChunkBlocks {
_ = c.io.SetDeadline(time.Now().Add(60 * time.Second))
c.read(t, lba, 4096)
}