diff --git a/internal/daemon/vm_lifecycle_steps.go b/internal/daemon/vm_lifecycle_steps.go index f932a15..6fcf27f 100644 --- a/internal/daemon/vm_lifecycle_steps.go +++ b/internal/daemon/vm_lifecycle_steps.go @@ -237,12 +237,18 @@ func (s *VMService) buildStartSteps(op *operationLog, sc *startContext) []startS }, }, { - // See the comment in the prior inline version: stale - // bitmaps from a reused COW make e2cp/e2rm refuse to - // touch the snapshot. e2fsck -fy is a no-op on a fresh - // snapshot. Exit codes 0 + 1 are both "ok" here. + // e2fsck protects against stale bitmaps in a COW reused + // from a prior aborted start — without it, e2cp/e2rm in + // patch_root_overlay refuse to touch the snapshot. On a + // freshly-created COW (system_overlay just truncated + + // created the file this run) there are no stale bitmaps + // to repair and e2fsck is pure overhead. Skip it in that + // case. Exit codes 0 + 1 are both "ok" when we do run it. name: "fsck_snapshot", run: func(ctx context.Context, sc *startContext) error { + if sc.systemOverlayCreated { + return nil + } return s.privOps().FsckSnapshot(ctx, sc.live.DMDev) }, },