← Documents Documentation/filesystems/ext4/about.rst GitHub 원문 ↗

Linux 6.18.37 · Filesystems

About this Book

ext4 on-disk 문서의 범위, 기준 version, logical block과 field 표기를 설명하는 전문 번역입니다.

Source pathDocumentation/filesystems/ext4/about.rst
Source versionLinux v6.18.37
TranslationDUJINLABS 전문 번역 + 해설

요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.

1. 요약·해설

원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.

요약·해설

about.rst:1-44

ext4 on-disk 문서는 address를 raw LBA가 아니라 logical block으로 표현합니다. block size는 `2 ^ (10 + sb.s_log_block_size)`이고 보통 4KiB이며, `$block_size`, `sb`, `inode` 표기 규칙을 이후 모든 ext4 문서에 적용합니다.

ext4 주소 해석
`sb.s_log_block_size` 읽기`2 ^ (10 + value)` bytes 계산계산한 logical block을 `$block_size`로 사용모든 disk location을 logical block 번호로 해석

superblock field에서 문서의 disk 위치 단위로 이어지는 흐름입니다.

2. 영어 원문 전체

번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.

원문 전체 펼치기
1 .. SPDX-License-Identifier: GPL-2.0
2
3 About this Book
4 ===============
5
6 This document attempts to describe the on-disk format for ext4
7 filesystems. The same general ideas should apply to ext2/3 filesystems
8 as well, though they do not support all the features that ext4 supports,
9 and the fields will be shorter.
10
11 **NOTE**: This is a work in progress, based on notes that the author
12 (djwong) made while picking apart a filesystem by hand. The data
13 structure definitions should be current as of Linux 4.18 and
14 e2fsprogs-1.44. All comments and corrections are welcome, since there is
15 undoubtedly plenty of lore that might not be reflected in freshly
16 created demonstration filesystems.
17
18 License
19 -------
20 This book is licensed under the terms of the GNU Public License, v2.
21
22 Terminology
23 -----------
24
25 ext4 divides a storage device into an array of logical blocks both to
26 reduce bookkeeping overhead and to increase throughput by forcing larger
27 transfer sizes. Generally, the block size will be 4KiB (the same size as
28 pages on x86 and the block layer's default block size), though the
29 actual size is calculated as 2 ^ (10 + ``sb.s_log_block_size``) bytes.
30 Throughout this document, disk locations are given in terms of these
31 logical blocks, not raw LBAs, and not 1024-byte blocks. For the sake of
32 convenience, the logical block size will be referred to as
33 ``$block_size`` throughout the rest of the document.
34
35 When referenced in ``preformatted text`` blocks, ``sb`` refers to fields
36 in the super block, and ``inode`` refers to fields in an inode table
37 entry.
38
39 Other References
40 ----------------
41
42 Also see https://www.nongnu.org/ext2-doc/ for quite a collection of
43 information about ext2/3. Here's another old reference:
44 http://wiki.osdev.org/Ext2
45

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 조건으로 배포됩니다.

ext4 on-disk 문서 기준
항목내용
주 대상ext4 on-disk format
부분 적용ext2/3의 공통 개념
차이ext2/3은 기능이 적고 field가 짧음
정의 기준Linux 4.18, e2fsprogs-1.44
LicenseGNU 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-44

ext4는 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` 문서를 제시합니다.

ext4 문서 표기 규칙
표기
4KiB일반적인 logical block size
`2 ^ (10 + sb.s_log_block_size)`실제 block size 계산식
Disk locationraw LBA가 아닌 logical block 단위
`$block_size`문서 전반의 logical block size
`sb`super block field
`inode`inode table entry field

주소와 구조체 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