요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
1
What: /sys/devices/.../online
2
Date: April 2013
3
Contact: Rafael J. Wysocki <[email protected]>
4
Description:
5
The /sys/devices/.../online attribute is only present for
6
devices whose bus types provide .online() and .offline()
7
callbacks. The number read from it (0 or 1) reflects the value
8
of the device's 'offline' field. If that number is 1 and '0'
9
(or 'n', or 'N') is written to this file, the device bus type's
10
.offline() callback is executed for the device and (if
11
successful) its 'offline' field is updated accordingly. In
12
turn, if that number is 0 and '1' (or 'y', or 'Y') is written to
13
this file, the device bus type's .online() callback is executed
14
for the device and (if successful) its 'offline' field is
15
updated as appropriate.
17
After a successful execution of the bus type's .offline()
18
callback the device cannot be used for any purpose until either
19
it is removed (i.e. device_del() is called for it), or its bus
20
type's .online() is executed successfully.
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.
Generic device online switch
1-20| 항목 | 한국어 전문 번역 |
|---|---|
| What | /sys/devices/.../online |
| Date | 2013년 4월 |
| Contact | Rafael J. Wysocki <[email protected]> |
| Description | 이 attribute는 bus type이 .online()과 .offline() callback을 제공하는 device에만 존재합니다. Read한 0 또는 1은 device의 'offline' field 값을 반대로 반영합니다. 값이 1일 때 0, n 또는 N을 write하면 해당 device에 bus type의 .offline() callback을 실행하고, 성공하면 'offline' field를 그에 맞게 갱신합니다. 반대로 값이 0일 때 1, y 또는 Y를 write하면 .online() callback을 실행하고, 성공하면 'offline' field를 적절히 갱신합니다. .offline() callback이 성공한 뒤에는 device_del()로 제거되거나 bus type의 .online()이 성공할 때까지 그 device를 어떤 용도로도 사용할 수 없습니다. |
현재 readWriteCallback성공 후
10 / n / N.offline()online=0, 사용 불가
01 / y / Y.online()online=1, 사용 가능
Visible online value, accepted writes와 callback의 대응입니다.
online=1 device→0/n/N write→.offline() callback success→Device unavailable→device_del() 또는 successful .online()
Offline된 device가 다시 사용 가능해지는 두 경로입니다.
Bus callbacks and device availability
sysfs-devices-online:1-20Attribute 값은 device의 offline field를 반대로 표현하며, 0/n/N write는 .offline(), 1/y/Y write는 .online() callback을 실행합니다.