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

Linux 6.18.37 · Filesystems

High Level Design

ext4 block group 기하, allocator locality와 byte order를 설명하는 전문 번역입니다.

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

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

1. 요약·해설

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

요약·해설

overview.rst:1-30

ext4는 파일 block을 가능한 한 같은 group에 모아 seek를 줄이며, 4KiB 기본 block에서 group 하나는 128MiB입니다.

핵심 흐름
device를 block group으로 분할파일별 locality 유지ext4는 little-endianJBD2는 big-endian

문서의 핵심 관계를 짧게 정리합니다.

2. 영어 원문 전체

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

원문 전체 펼치기
1 .. SPDX-License-Identifier: GPL-2.0
2
3 High Level Design
4 =================
5
6 An ext4 file system is split into a series of block groups. To reduce
7 performance difficulties due to fragmentation, the block allocator tries
8 very hard to keep each file's blocks within the same group, thereby
9 reducing seek times. The size of a block group is specified in
10 ``sb.s_blocks_per_group`` blocks, though it can also calculated as 8 *
11 ``block_size_in_bytes``. With the default block size of 4KiB, each group
12 will contain 32,768 blocks, for a length of 128MiB. The number of block
13 groups is the size of the device divided by the size of a block group.
14
15 All fields in ext4 are written to disk in little-endian order. HOWEVER,
16 all fields in jbd2 (the journal) are written to disk in big-endian
17 order.
18
19 .. toctree::
20
21 blocks
22 blockgroup
23 special_inodes
24 allocators
25 checksums
26 bigalloc
27 inlinedata
28 eainode
29 verity
30 atomic_writes
31

3. 한국어 전문 번역

영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.

ext4 고수준 block group 설계

1-16

ext4 filesystem은 연속된 block group들로 나뉩니다. fragmentation 때문에 생기는 성능 저하를 줄이기 위해 block allocator는 가능한 한 한 파일의 block을 같은 group 안에 유지하여 seek time을 줄입니다.

block group 크기는 `sb.s_blocks_per_group` block으로 지정하며 `8 * block_size_in_bytes`로도 계산할 수 있습니다. 기본 block size 4KiB에서는 group당 32,768 block, 즉 128MiB입니다.

block group 수는 device size를 block group size로 나눈 값입니다.

ext4의 모든 on-disk field는 little-endian이지만 journal인 JBD2의 모든 field는 big-endian입니다.

기본 block group 기하
항목계산·값
Block group size(blocks)`sb.s_blocks_per_group = 8 * block_size_in_bytes`
기본 block size4KiB
기본 group block 수32,768 blocks
기본 group byte 크기128MiB
Block group 수`device_size / block_group_size`
ext4 byte orderlittle-endian
JBD2 byte orderbig-endian

4KiB 기본 block 크기에서의 계산입니다.

.. SPDX-License-Identifier: GPL-2.0

High Level Design
=================

An ext4 file system is split into a series of block groups. To reduce
performance difficulties due to fragmentation, the block allocator tries
very hard to keep each file's blocks within the same group, thereby
reducing seek times. The size of a block group is specified in
``sb.s_blocks_per_group`` blocks, though it can also calculated as 8 *
``block_size_in_bytes``. With the default block size of 4KiB, each group
will contain 32,768 blocks, for a length of 128MiB. The number of block
groups is the size of the device divided by the size of a block group.

All fields in ext4 are written to disk in little-endian order. HOWEVER,
all fields in jbd2 (the journal) are written to disk in big-endian

고수준 설계 하위 문서

17-30

이 절의 하위 문서는 `blocks`, `blockgroup`, `special_inodes`, `allocators`, `checksums`, `bigalloc`, `inlinedata`, `eainode`, `verity`, `atomic_writes` 순서입니다.

ext4 고수준 설계 문서
`blocks`와 `blockgroup`: 기본 공간 단위`special_inodes`와 `allocators`: 예약 객체와 할당 정책`checksums`와 `bigalloc`: 무결성과 cluster 할당`inlinedata`와 `eainode`: inode 내부·별도 inode 데이터`verity`와 `atomic_writes`: 검증과 원자적 쓰기

공간 배치에서 무결성과 고급 기능으로 이어지는 읽기 순서입니다.

order.

.. toctree::

   blocks
   blockgroup
   special_inodes
   allocators
   checksums
   bigalloc
   inlinedata
   eainode
   verity
   atomic_writes