요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
.. SPDX-License-Identifier: GPL-2.0
About this Book
===============
This document attempts to describe the on-disk format for ext4
filesystems. The same general ideas should apply to ext2/3 filesystems
as well, though they do not support all the features that ext4 supports,
and the fields will be shorter.
**NOTE**: This is a work in progress, based on notes that the author
(djwong) made while picking apart a filesystem by hand. The data
structure definitions should be current as of Linux 4.18 and
e2fsprogs-1.44. All comments and corrections are welcome, since there is
undoubtedly plenty of lore that might not be reflected in freshly
created demonstration filesystems.
License
-------
This book is licensed under the terms of the GNU Public License, v2.
Terminology
-----------
ext4 divides a storage device into an array of logical blocks both to
reduce bookkeeping overhead and to increase throughput by forcing larger
transfer sizes. Generally, the block size will be 4KiB (the same size as
pages on x86 and the block layer's default block size), though the
actual size is calculated as 2 ^ (10 + ``sb.s_log_block_size``) bytes.
Throughout this document, disk locations are given in terms of these
logical blocks, not raw LBAs, and not 1024-byte blocks. For the sake of
convenience, the logical block size will be referred to as
``$block_size`` throughout the rest of the document.
When referenced in ``preformatted text`` blocks, ``sb`` refers to fields
in the super block, and ``inode`` refers to fields in an inode table
entry.
Other References
----------------
Also see https://www.nongnu.org/ext2-doc/ for quite a collection of
information about ext2/3. Here's another old reference:
http://wiki.osdev.org/Ext2
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.
문서의 범위와 라이선스
1-20이 문서는 ext4 filesystem의 on-disk format을 설명하려는 책입니다. 일반적인 발상은 ext2와 ext3에도 적용되지만, ext2/3은 ext4의 모든 기능을 지원하지 않고 field 길이도 더 짧습니다.
이 문서는 저자 `djwong`이 파일시스템을 손으로 분석하며 작성한 메모를 바탕으로 계속 보완되는 자료입니다. data structure 정의는 Linux 4.18과 e2fsprogs-1.44 시점을 기준으로 최신이어야 하지만, 새 demonstration filesystem만 조사해서는 드러나지 않는 관행과 지식이 있을 수 있으므로 의견과 수정 제안을 환영합니다.
이 책은 GNU Public License v2 조건으로 배포됩니다.
적용 범위와 명시된 기준 version을 정리합니다.
.. SPDX-License-Identifier: GPL-2.0
About this Book
===============
This document attempts to describe the on-disk format for ext4
filesystems. The same general ideas should apply to ext2/3 filesystems
as well, though they do not support all the features that ext4 supports,
and the fields will be shorter.
**NOTE**: This is a work in progress, based on notes that the author
(djwong) made while picking apart a filesystem by hand. The data
structure definitions should be current as of Linux 4.18 and
e2fsprogs-1.44. All comments and corrections are welcome, since there is
undoubtedly plenty of lore that might not be reflected in freshly
created demonstration filesystems.
License
-------
This book is licensed under the terms of the GNU Public License, v2.
logical block 용어와 참고 자료
21-44ext4는 bookkeeping overhead를 줄이고 더 큰 transfer size를 강제해 throughput을 높이기 위해 storage device를 logical block 배열로 나눕니다. 일반적인 block size는 x86 page 및 block layer 기본 block size와 같은 4KiB입니다.
실제 logical block size는 `2 ^ (10 + sb.s_log_block_size)` bytes로 계산합니다. 이 문서의 disk location은 raw LBA나 1024-byte block이 아니라 이 logical block 단위로 표시하며, 이후 편의를 위해 logical block size를 `$block_size`라고 부릅니다.
preformatted text에서 `sb`는 super block의 field를, `inode`는 inode table entry의 field를 뜻합니다.
추가 참고 자료로 ext2/3 정보를 모은 `https://www.nongnu.org/ext2-doc/`와 오래된 `http://wiki.osdev.org/Ext2` 문서를 제시합니다.
주소와 구조체 field를 읽을 때 사용하는 약속입니다.
Terminology
-----------
ext4 divides a storage device into an array of logical blocks both to
reduce bookkeeping overhead and to increase throughput by forcing larger
transfer sizes. Generally, the block size will be 4KiB (the same size as
pages on x86 and the block layer's default block size), though the
actual size is calculated as 2 ^ (10 + ``sb.s_log_block_size``) bytes.
Throughout this document, disk locations are given in terms of these
logical blocks, not raw LBAs, and not 1024-byte blocks. For the sake of
convenience, the logical block size will be referred to as
``$block_size`` throughout the rest of the document.
When referenced in ``preformatted text`` blocks, ``sb`` refers to fields
in the super block, and ``inode`` refers to fields in an inode table
entry.
Other References
----------------
Also see https://www.nongnu.org/ext2-doc/ for quite a collection of
information about ext2/3. Here's another old reference:
http://wiki.osdev.org/Ext2
요약·해설
about.rst:1-44ext4 on-disk 문서는 address를 raw LBA가 아니라 logical block으로 표현합니다. block size는 `2 ^ (10 + sb.s_log_block_size)`이고 보통 4KiB이며, `$block_size`, `sb`, `inode` 표기 규칙을 이후 모든 ext4 문서에 적용합니다.
superblock field에서 문서의 disk 위치 단위로 이어지는 흐름입니다.