Files
document-haness/docs/virtualization/final/assets/diagrams/qcow2-mapping-clusters/qcow2-mapping-clusters.alt.md
T

27 lines
2.0 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# qcow2 L1·L2 매핑과 backing fallback
## Alternative text
게스트 오프셋이 L1과 L2 표를 지나 현재 qcow2 데이터 클러스터로 가거나, L2 항목이 0일 때 backing file 또는 zero-fill로 갈라지는 qcow2 매핑도.
## Long description
게스트가 읽으려는 위치는 L1 표와 L2 표를 통해 파일 안 데이터 클러스터 오프셋으로 변환된다. 매핑된 값이 있으면 현재 qcow2의 데이터 클러스터를 읽는다. 값이 0이고 backing file이 있으면 base.qcow2의 같은 가상 위치를 읽고, backing file이 없으면 0으로 채운 64KB를 반환한다. backing file 경로는 qcow2 헤더의 문자열이므로 오버레이만 옮기면 부팅할 수 없다는 제한도 그림 끝에 반영한다.
## Elements and evidence
- **Guest offset** (data): 게스트가 읽으려는 가상 디스크 위치. Evidence: L14317L14325.
- **L1 table** (component): 필요한 L2 표가 있는 클러스터 위치를 찾는다. Evidence: L14312L14337.
- **L2 entry** (component): 현재 qcow2 데이터 클러스터 오프셋을 가지거나 0일 수 있다. Evidence: L14320L14347.
- **현재 qcow2 data cluster** (store): L2 값이 있을 때 같은 qcow2 파일 안에서 읽는 데이터 클러스터. Evidence: L14267L14272, L14343L14345.
- **base.qcow2** (store): L2 항목이 0이고 backing file이 있을 때 같은 가상 위치를 읽는 바닥 파일. Evidence: L14343L14354.
- **zero-filled 64KB** (result): L2 항목이 0이고 backing file도 없을 때 만들어 반환하는 0 데이터. Evidence: L14343L14347.
## Relationships
- **L1 table → L2 entry:** L2 cluster. Evidence: L14320L14337.
- **L2 entry → base.qcow2:** 0 + backing. Evidence: L14343L14350.
- **L2 entry → 현재 qcow2 data cluster:** mapped. Evidence: L14343L14345.
- **L2 entry → zero-filled 64KB:** 0 + no backing. Evidence: L14343L14347.
- **Guest offset → L1 table:** 상위 비트. Evidence: L14317L14324.