Skip to content

docs: close D3 fc/OpenZFS upstream review (VALIDATED, no code change)#88

Merged
HardcoreMonk merged 1 commit into
mainfrom
chore/d3-upstream-review
Jul 19, 2026
Merged

docs: close D3 fc/OpenZFS upstream review (VALIDATED, no code change)#88
HardcoreMonk merged 1 commit into
mainfrom
chore/d3-upstream-review

Conversation

@HardcoreMonk

Copy link
Copy Markdown
Owner

요약

백로그 "fc upstream/OpenZFS 참고 보고 검토(D3)"를 VALIDATED로 종결한다(docs-only, 코드 변경 없음). anvil의 D3 방어(coarse-hole 파일시스템에서 sparse diff snapshot 오염 방지)를 upstream Firecracker diff-snapshot + OpenZFS hole-보고 의미론에 대조해 검증했고, 전 지점 정합·fail-safe·근본적 내구임을 확인했다.

D3 배경

ZFS(recordsize>4K)는 sparse diff의 hole을 record 단위로만 보고 → SEEK_HOLE이 written 영역을 과대보고 → 미기록 padding이 base memory를 덮어써 guest triple-fault(D3). anvil 방어(PR #36): ProbeHoleGranularity로 fs granularity 측정 → 창설측 diff→full 강등(applyD3DiffGuard) + 판독측 overlay 거부 + recordsize=4K dataset 권장.

검증 (upstream 대조, deep-worker 조사 + 컨트롤러 코드 검증)

Q 결과 핵심 근거
fc diff = 4K sparse dirty-page? HoleGranularityFine=4096 정확? fc snapshot-support.md(sparse dirty diff), KVM 4K dirty-tracking. fc 자체 merge 도구도 동일 SEEK_HOLE overlay → 취약성은 fc 포맷 고유
ZFS SEEK_HOLE = recordsize 정렬? FreeBSD D36194(hole 단위=recordsize), dnode_next_offset block 탐색
SEEK_HOLE가 미-sync dirty 미보고 → fsync+retry 옳은 가드? zfs_dmu_offset_next_sync man
방어 sound·complete·fail-safe? lseek(2) 계약이 loophole, probe는 모든 불확실=coarse, 엣지(recordsize==4K/<4K/≥256K/ENOTSUP/거짓fs) 전부 안전
완화 가능? 근본적·내구 recordsize 과대보고는 ZFS 할당 모델 고유(어떤 버전도 finer 미보고). 유일 완화 = 이미 권장하는 recordsize=4K

컨트롤러 검증(코드 대조): review의 핵심 Note 1(read-side 가드는 현재 fs를 probe, 태생 fs 아님 → 창설측 강등의 보편성에 의존)을 직접 확인 — snapshot 생성 경로는 단일(api.go resolveSnapshotTypeapplyD3DiffGuard), coarse fs에서 항상 diff→full 강등하므로 anvil은 coarse-born diff를 절대 생성하지 않음 → Note 1은 이론적 residual(legacy/non-anvil diff)일 뿐 실무 gap 아님.

변경

부차 발견 (검토 밖·선택, 비차단)

  • dead code: storage.HoleGranularityCoarse 헬퍼는 production 호출자 0(데몬은 ProbeHoleGranularity 직접) — 선택적 cleanup 후보(별도 작업).
  • (선택) fc 자체 rebase-snap도 동일 취약 → fc 문서 노트 제보 후보(anvil 책임 아님).

lifecycle

docs 검토·종결(코드/계약 변경 없음). deep-worker(Opus) upstream 조사 + 컨트롤러 코드 검증. gofmt clean(.go 무변경).

D3 review: anvil's coarse-hole diff mitigation (probe→demote/refuse + recordsize=4K)
validated against upstream fc (4K sparse dirty-page diff) + OpenZFS (recordsize hole
granularity, zfs_dmu_offset_next_sync dirty reporting) semantics — fail-safe, durable,
no code change. Verified the read-side guard's invariant holds (creation-side demotion
is universal: single resolveSnapshotType->applyD3DiffGuard path). Durable review doc +
CONTEXT closure. Also closes the now-merged runes-migration backlog line (#87 doc-sync).
@coderabbitai

coderabbitai Bot commented Jul 19, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@HardcoreMonk, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 25 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 06cb9fd9-5c4e-4370-a08f-4e7bb2c0b6fb

📥 Commits

Reviewing files that changed from the base of the PR and between 42d78c4 and 4d4b342.

📒 Files selected for processing (2)
  • CONTEXT.md
  • docs/operations/2026-07-19-d3-upstream-review.md
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/d3-upstream-review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@HardcoreMonk
HardcoreMonk merged commit 353c34b into main Jul 19, 2026
2 checks passed
@HardcoreMonk
HardcoreMonk deleted the chore/d3-upstream-review branch July 19, 2026 10:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant