← Documents Documentation/ABI/testing/sysfs-fs-erofs GitHub 원문 ↗

Linux 6.18.37 · ABI / testing

EROFS filesystem sysfs ABI

EROFS feature discovery, synchronous decompression, compression-cache eviction, hardware acceleration과 directory readahead controls를 설명합니다.

Source pathDocumentation/ABI/testing/sysfs-fs-erofs
Source versionLinux v6.18.37
TranslationDUJINLABS 전문 번역 + 해설

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

1. 요약·해설

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

Features and decompression policy

sysfs-fs-erofs:1-23

Enabled kernel features를 확인하고 synchronous·small asynchronous reads의 reader-thread decompression 범위를 0·1·2 modes로 선택합니다.

Caches, accelerators and readahead

sysfs-fs-erofs:24-49

Compressed folios와 pclusters를 선택적으로 비우고 qat_deflate accelerator와 readdir byte readahead를 설정합니다.

2. 영어 원문 전체

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

원문 전체 펼치기
1 What: /sys/fs/erofs/features/
2 Date: November 2021
3 Contact: "Huang Jianan" <huangjianan@oppo.com>
4 Description: Shows all enabled kernel features.
5 Supported features:
6 zero_padding, compr_cfgs, big_pcluster, chunked_file,
7 device_table, compr_head2, sb_chksum, ztailpacking,
8 dedupe, fragments, 48bit, metabox.
9
10 What: /sys/fs/erofs/<disk>/sync_decompress
11 Date: November 2021
12 Contact: "Huang Jianan" <huangjianan@oppo.com>
13 Description: Control strategy of synchronous decompression. Synchronous
14 decompression tries to decompress in the reader thread for
15 synchronous reads and small asynchronous reads (<= 12 KiB):
16
17 - 0 (auto, default): apply to synchronous reads only, but will
18 switch to 1 (force on) if any decompression
19 request is detected in atomic contexts;
20 - 1 (force on): apply to synchronous reads and small
21 asynchronous reads;
22 - 2 (force off): disable synchronous decompression completely.
23
24 What: /sys/fs/erofs/<disk>/drop_caches
25 Date: November 2024
26 Contact: "Guo Chunhai" <guochunhai@vivo.com>
27 Description: Writing to this will drop compression-related caches,
28 currently used to drop in-memory pclusters and cached
29 compressed folios:
30
31 - 1 : invalidate cached compressed folios
32 - 2 : drop in-memory pclusters
33 - 3 : drop in-memory pclusters and cached compressed folios
34
35 What: /sys/fs/erofs/accel
36 Date: May 2025
37 Contact: "Bo Liu" <liubo03@inspur.com>
38 Description: Used to set or show hardware accelerators in effect
39 and multiple accelerators are separated by '\n'.
40 Supported accelerator(s): qat_deflate.
41 Disable all accelerators with an empty string (echo > accel).
42
43 What: /sys/fs/erofs/<disk>/dir_ra_bytes
44 Date: July 2025
45 Contact: "Chao Yu" <chao@kernel.org>
46 Description: Used to set or show readahead bytes during readdir(), by
47 default the value is 16384.
48
49 - 0: disable readahead.
50

3. 한국어 전문 번역

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

Enabled EROFS kernel features

1-9
항목한국어 전문 번역
What/sys/fs/erofs/features/
Date2021년 11월
Contact"Huang Jianan" <huangjianan@oppo.com>
Description활성화된 모든 EROFS kernel features를 표시합니다. 지원하는 features는 `zero_padding`, `compr_cfgs`, `big_pcluster`, `chunked_file`, `device_table`, `compr_head2`, `sb_chksum`, `ztailpacking`, `dedupe`, `fragments`, `48bit`, `metabox`입니다.
AccessRead
EROFS feature names
FeatureFeatureFeature
zero_paddingcompr_cfgsbig_pcluster
chunked_filedevice_tablecompr_head2
sb_chksumztailpackingdedupe
fragments48bitmetabox

현재 sysfs feature directory에서 확인할 수 있는 names입니다.

EROFS synchronous decompression strategy

10-23
항목한국어 전문 번역
What/sys/fs/erofs/<disk>/sync_decompress
Date2021년 11월
Contact"Huang Jianan" <huangjianan@oppo.com>
DescriptionSynchronous decompression 전략을 제어합니다. 이 방식은 synchronous reads와 12 KiB 이하의 작은 asynchronous reads를 reader thread에서 decompress하려고 합니다. 값 `0`은 auto이자 default로 synchronous reads에만 적용하지만 atomic contexts에서 decompression request가 하나라도 감지되면 `1`로 전환합니다. 값 `1`은 force on으로 synchronous reads와 작은 asynchronous reads 모두에 적용하고, 값 `2`는 force off로 synchronous decompression을 완전히 disable합니다.
AccessRead/write
EROFS sync_decompress modes
ValueModeSynchronous readsAsync reads <= 12 KiB
0Auto, defaultEnabledOnly after atomic-context request
1Force onEnabledEnabled
2Force offDisabledDisabled

Reader-thread decompression의 적용 범위입니다.

Drop EROFS compression caches

24-34
항목한국어 전문 번역
What/sys/fs/erofs/<disk>/drop_caches
Date2024년 11월
Contact"Guo Chunhai" <guochunhai@vivo.com>
Description이 attribute에 값을 쓰면 compression-related caches를 버립니다. 현재는 in-memory pclusters와 cached compressed folios를 대상으로 합니다. 값 `1`은 cached compressed folios를 invalidate하고, `2`는 in-memory pclusters를 drop하며, `3`은 둘 다 수행합니다.
AccessWrite
EROFS drop_caches values
ValueCached compressed foliosIn-memory pclusters
1InvalidateKeep
2KeepDrop
3InvalidateDrop

각 write value가 비우는 compression cache입니다.

EROFS hardware accelerators

35-42
항목한국어 전문 번역
What/sys/fs/erofs/accel
Date2025년 5월
Contact"Bo Liu" <liubo03@inspur.com>
Description현재 적용할 hardware accelerators를 설정하거나 표시합니다. 여러 accelerators는 newline(`\n`)으로 구분합니다. 지원하는 accelerator는 `qat_deflate`이며 empty string을 쓰는 `echo > accel`로 모든 accelerators를 disable합니다.
AccessRead/write
EROFS accelerator control
InputEffect
qat_deflateEnable the supported accelerator
Multiple newline-separated namesEnable multiple accelerators
Empty stringDisable all accelerators

현재 지원 backend와 disable operation입니다.

EROFS readdir readahead size

43-49
항목한국어 전문 번역
What/sys/fs/erofs/<disk>/dir_ra_bytes
Date2025년 7월
Contact"Chao Yu" <chao@kernel.org>
Description`readdir()` 중 사용할 readahead byte 수를 설정하거나 표시합니다. Default value는 16384이고 `0`은 readahead를 disable합니다.
AccessRead/write
EROFS directory readahead
ValueBehavior
16384Default readahead bytes
0Disable readahead
Other non-negative valueUse the configured byte count

Default와 disabled values입니다.