← Documents Documentation/ABI/testing/sysfs-block-loop GitHub 원문 ↗

Linux 6.18.37 · ABI / testing

Loop block device sysfs ABI

Loop device의 autoclear lifecycle, backing file path, byte offset와 mapped size, automatic partition scanning, backing file direct I/O 상태를 설명합니다.

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

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

1. 요약·해설

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

Autoclear lifecycle와 backing file

sysfs-block-loop:1-16

autoclear는 마지막 close 뒤 loopback device가 스스로 해제되는 mode를 0/1로 보고하고, backing_file은 data block을 mapping하는 file path를 제공합니다.

Backing file mapping range

sysfs-block-loop:18-31

offset은 mapping 시작 byte이고 sizelimit는 그 offset부터 block device가 mapping하는 byte 수입니다.

Automatic partition scanning

sysfs-block-loop:33-42

partscan은 setup ioctl의 LO_FLAGS_PARTSCAN 요청으로 loop device별 자동 partition scan을 켰는지 보고하며 default는 scan하지 않는 상태입니다.

Backing file direct I/O

sysfs-block-loop:44-50

dio는 backing file access에 direct I/O를 사용 중인지 1 또는 0으로 보여 줍니다.

2. 영어 원문 전체

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

원문 전체 펼치기
1 What: /sys/block/loopX/loop/autoclear
2 Date: Aug, 2010
3 KernelVersion: v2.6.37
4 Contact: linux-block@vger.kernel.org
5 Description:
6 (RO) Shows if the device is in autoclear mode or not ( "1" or
7 "0"). Autoclear (if set) indicates that the loopback device will
8 self-distruct after last close.
9
10 What: /sys/block/loopX/loop/backing_file
11 Date: Aug, 2010
12 KernelVersion: v2.6.37
13 Contact: linux-block@vger.kernel.org
14 Description:
15 (RO) The path of the backing file that the loop device maps its
16 data blocks to.
17
18 What: /sys/block/loopX/loop/offset
19 Date: Aug, 2010
20 KernelVersion: v2.6.37
21 Contact: linux-block@vger.kernel.org
22 Description:
23 (RO) Start offset (in bytes).
24
25 What: /sys/block/loopX/loop/sizelimit
26 Date: Aug, 2010
27 KernelVersion: v2.6.37
28 Contact: linux-block@vger.kernel.org
29 Description:
30 (RO) The size (in bytes) that the block device maps, starting
31 from the offset.
32
33 What: /sys/block/loopX/loop/partscan
34 Date: Aug, 2011
35 KernelVersion: v3.10
36 Contact: linux-block@vger.kernel.org
37 Description:
38 (RO) Shows if automatic partition scanning is enabled for the
39 device or not ("1" or "0"). This can be requested individually
40 per loop device during its setup by setting LO_FLAGS_PARTSCAN in
41 in the ioctl request. By default, no partition tables are
42 scanned.
43
44 What: /sys/block/loopX/loop/dio
45 Date: Aug, 2015
46 KernelVersion: v4.10
47 Contact: linux-block@vger.kernel.org
48 Description:
49 (RO) Shows if direct IO is being used to access backing file or
50 not ("1 or "0").
51

3. 한국어 전문 번역

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

Loop device autoclear와 backing file

1-16
WhatDateKernelVersionContact전문 번역
/sys/block/loopX/loop/autoclear2010년 8월v2.6.37linux-block@vger.kernel.org(RO) Device가 autoclear mode인지 여부를 "1" 또는 "0"으로 보여 줍니다. Autoclear가 설정되었다면 마지막 close 뒤 loopback device가 스스로 해제됨을 나타냅니다.
/sys/block/loopX/loop/backing_file2010년 8월v2.6.37linux-block@vger.kernel.org(RO) Loop device가 자신의 data block을 mapping하는 backing file의 path입니다.
autoclear의미
0마지막 close 뒤에도 autoclear하지 않음
1마지막 close 뒤 loopback device를 자동 해제함

Backing file의 byte mapping 범위

18-31
WhatDateKernelVersionContact전문 번역
/sys/block/loopX/loop/offset2010년 8월v2.6.37linux-block@vger.kernel.org(RO) Start offset을 byte 단위로 나타냅니다.
/sys/block/loopX/loop/sizelimit2010년 8월v2.6.37linux-block@vger.kernel.org(RO) Offset에서 시작해 block device가 mapping하는 size를 byte 단위로 나타냅니다.
Loop device backing-file mapping
Backing file startSkip offset bytesMapped range of sizelimit bytesLoop block device address space
Loop device data blocksbacking_file pathBacking file storage

Loop block address space가 backing file의 offset부터 sizelimit만큼 이어지는 관계를 보여 준다.

Loop device automatic partition scan

33-42
항목전문 번역
What/sys/block/loopX/loop/partscan
Date2011년 8월
KernelVersionv3.10
Contactlinux-block@vger.kernel.org
Description(RO) Device에 automatic partition scanning이 enable되어 있는지 "1" 또는 "0"으로 보여 줍니다. Loop device를 setup할 때 ioctl request에 LO_FLAGS_PARTSCAN을 설정하여 device별로 요청할 수 있습니다. Default로는 partition table을 scan하지 않습니다.
partscan의미
0Partition table을 자동 scan하지 않음(default)
1Setup ioctl에서 LO_FLAGS_PARTSCAN을 요청해 자동 scan함

Backing file direct I/O 상태

44-50
항목전문 번역
What/sys/block/loopX/loop/dio
Date2015년 8월
KernelVersionv4.10
Contactlinux-block@vger.kernel.org
Description(RO) Backing file에 access할 때 direct I/O를 사용하는지 여부를 "1" 또는 "0"으로 보여 줍니다.
dio의미
0Backing file access에 direct I/O를 사용하지 않음
1Backing file access에 direct I/O를 사용함