← Documents Documentation/scsi/sd-parameters.rst GitHub 원문 ↗

Linux 6.18.37 · SCSI

Linux SCSI disk driver(sd) parameter

sd driver의 cache_type 문자열과 write/read cache bit, 영구·임시 변경법을 설명합니다.

Source pathDocumentation/scsi/sd-parameters.rst
Source versionLinux v6.18.37
TranslationDUJINLABS 전문 번역 + 해설

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

1. 요약·해설

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

요약·해설

sd-parameters.rst:1-27

sd driver의 cache_type 문자열과 write/read cache bit, 영구·임시 변경법을 설명합니다.

2. 영어 원문 전체

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

원문 전체 펼치기
1 .. SPDX-License-Identifier: GPL-2.0
2
3 ======================================
4 Linux SCSI Disk Driver (sd) Parameters
5 ======================================
6
7 cache_type (RW)
8 ---------------
9 Enable/disable drive write & read cache.
10
11 =========================== === === =========== ==========
12 cache_type string WCE RCD Write cache Read cache
13 =========================== === === =========== ==========
14 write through 0 0 off on
15 none 0 1 off off
16 write back 1 0 on on
17 write back, no read (daft) 1 1 on off
18 =========================== === === =========== ==========
19
20 To set cache type to "write back" and save this setting to the drive::
21
22 # echo "write back" > cache_type
23
24 To modify the caching mode without making the change persistent, prepend
25 "temporary " to the cache type string. E.g.::
26
27 # echo "temporary write back" > cache_type
28

3. 한국어 전문 번역

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

cache_type과 WCE·RCD 조합

1-19

읽고 쓸 수 있는 `cache_type` parameter는 drive의 write cache와 read cache를 켜거나 끈다. `WCE`는 write cache enable, `RCD`는 read cache disable bit다.

sd cache_type
cache_typeWCERCDWrite cacheRead cache
write through00offon
none01offoff
write back10onon
write back, no read (daft)11onoff

문자열과 WCE·RCD bit가 실제 cache 상태로 이어지는 방식이다.

.. SPDX-License-Identifier: GPL-2.0

======================================
Linux SCSI Disk Driver (sd) Parameters
======================================

cache_type (RW)
---------------
Enable/disable drive write & read cache.

===========================   === ===   ===========   ==========
 cache_type string            WCE RCD   Write cache   Read cache
===========================   === ===   ===========   ==========
 write through                0   0     off           on
 none                         0   1     off           off
 write back                   1   0     on            on
 write back, no read (daft)   1   1     on            off
===========================   === ===   ===========   ==========

영구·임시 cache mode 설정

20-27

Cache type을 `write back`으로 바꾸고 drive에 설정을 저장하려면 `echo "write back" > cache_type`을 실행한다.

변경을 영구 저장하지 않고 caching mode만 임시로 바꾸려면 cache type 문자열 앞에 `temporary `를 붙인다. 예를 들어 `echo "temporary write back" > cache_type`을 사용한다.

Cache mode 기록
cache_type 문자열 선택temporary 접두사 여부 결정cache_type에 기록현재 mode 적용

같은 mode라도 temporary 접두사로 persistence를 구분한다.

To set cache type to "write back" and save this setting to the drive::

  # echo "write back" > cache_type

To modify the caching mode without making the change persistent, prepend
"temporary " to the cache type string. E.g.::

  # echo "temporary write back" > cache_type