요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
.. SPDX-License-Identifier: GPL-2.0
======================================
Macintosh HFSPlus Filesystem for Linux
======================================
HFSPlus is a filesystem first introduced in MacOS 8.1.
HFSPlus has several extensions to HFS, including 32-bit allocation
blocks, 255-character unicode filenames, and file sizes of 2^63 bytes.
Mount options
=============
When mounting an HFSPlus filesystem, the following options are accepted:
creator=cccc, type=cccc
Specifies the creator/type values as shown by the MacOS finder
used for creating new files. Default values: '????'.
uid=n, gid=n
Specifies the user/group that owns all files on the filesystem
that have uninitialized permissions structures.
Default: user/group id of the mounting process.
umask=n
Specifies the umask (in octal) used for files and directories
that have uninitialized permissions structures.
Default: umask of the mounting process.
session=n
Select the CDROM session to mount as HFSPlus filesystem. Defaults to
leaving that decision to the CDROM driver. This option will fail
with anything but a CDROM as underlying devices.
part=n
Select partition number n from the devices. This option only makes
sense for CDROMs because they can't be partitioned under Linux.
For disk devices the generic partition parsing code does this
for us. Defaults to not parsing the partition table at all.
decompose
Decompose file name characters.
nodecompose
Do not decompose file name characters.
force
Used to force write access to volumes that are marked as journalled
or locked. Use at your own risk.
nls=cccc
Encoding to use when presenting file names.
References
==========
kernel source: <file:fs/hfsplus>
Apple Technote 1150 https://developer.apple.com/legacy/library/technotes/tn/tn1150.html
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.
HFS+ 확장점과 기본 mount option
1-40HFSPlus(HFS+)는 MacOS 8.1에서 처음 도입된 filesystem입니다.
HFS+는 classic HFS에 여러 기능을 확장했습니다. 32-bit allocation block, 최대 255자의 Unicode filename, 최대 `2^63` byte의 file size를 지원합니다.
HFS+ mount 시에는 새 file의 Finder creator/type, 초기화되지 않은 permission structure의 소유권·umask, CD-ROM session과 partition을 지정할 수 있습니다.
`creator=cccc`와 `type=cccc`는 새 file을 만들 때 MacOS Finder가 표시할 네 문자 creator/type 값을 지정합니다. default 값은 `'????'`입니다.
`uid=n`과 `gid=n`은 permission structure가 초기화되지 않은 filesystem 항목을 소유할 user와 group을 지정합니다. 이미 유효한 permission structure가 있는 모든 file을 일괄 덮어쓰는 option은 아닙니다.
`uid`와 `gid`의 default는 mount를 수행한 process의 user ID와 group ID입니다.
`umask=n`은 permission structure가 초기화되지 않은 file과 directory에 적용할 umask를 8진수로 지정합니다. default는 mount process의 umask입니다.
`session=n`은 HFS+ filesystem으로 mount할 CD-ROM session을 선택합니다. default는 CD-ROM driver가 결정하게 두며 기반 device가 CD-ROM이 아니면 실패합니다.
`part=n`은 device의 partition number `n`을 선택합니다. Linux에서 CD-ROM을 일반 disk처럼 partition할 수 없으므로 CD-ROM에서만 의미가 있습니다.
disk device에서는 generic partition parsing code가 partition을 처리합니다. `part` option의 default 동작은 partition table을 전혀 해석하지 않는 것입니다.
원문이 강조하는 HFS+의 세 가지 확장입니다.
Finder 속성, permission 초기값과 CD-ROM 선택 option입니다.
.. SPDX-License-Identifier: GPL-2.0
======================================
Macintosh HFSPlus Filesystem for Linux
======================================
HFSPlus is a filesystem first introduced in MacOS 8.1.
HFSPlus has several extensions to HFS, including 32-bit allocation
blocks, 255-character unicode filenames, and file sizes of 2^63 bytes.
Mount options
=============
When mounting an HFSPlus filesystem, the following options are accepted:
creator=cccc, type=cccc
Specifies the creator/type values as shown by the MacOS finder
used for creating new files. Default values: '????'.
uid=n, gid=n
Specifies the user/group that owns all files on the filesystem
that have uninitialized permissions structures.
Default: user/group id of the mounting process.
umask=n
Specifies the umask (in octal) used for files and directories
that have uninitialized permissions structures.
Default: umask of the mounting process.
session=n
Select the CDROM session to mount as HFSPlus filesystem. Defaults to
leaving that decision to the CDROM driver. This option will fail
with anything but a CDROM as underlying devices.
part=n
Select partition number n from the devices. This option only makes
sense for CDROMs because they can't be partitioned under Linux.
For disk devices the generic partition parsing code does this
for us. Defaults to not parsing the partition table at all.
Filename 정규화·강제 쓰기·참조
41-61`decompose`는 filename의 character를 분해된 형태로 변환해 표시하도록 지정합니다.
`nodecompose`는 filename character를 분해하지 않도록 지정합니다. 두 option은 HFS+의 Unicode filename을 Linux namespace에 제시할 때 사용할 normalization 동작을 서로 반대로 선택합니다.
`force`는 journalled 또는 locked로 표시된 volume에 write access를 강제로 허용합니다. filesystem 보호 상태를 무시할 수 있으므로 원문은 명시적으로 사용자의 책임 아래 사용하라고 경고합니다.
`nls=cccc`는 filename을 표시할 때 사용할 encoding을 지정합니다.
HFS+ kernel source의 위치는 `fs/hfsplus`입니다. 파일 형식의 외부 참조로는 Apple Technote 1150인 `https://developer.apple.com/legacy/library/technotes/tn/tn1150.html`이 제시됩니다.
Unicode 표시 방식과 위험한 강제 쓰기 동작을 구분합니다.
filename normalization과 표시 encoding을 독립적으로 결정합니다.
decompose
Decompose file name characters.
nodecompose
Do not decompose file name characters.
force
Used to force write access to volumes that are marked as journalled
or locked. Use at your own risk.
nls=cccc
Encoding to use when presenting file names.
References
==========
kernel source: <file:fs/hfsplus>
Apple Technote 1150 https://developer.apple.com/legacy/library/technotes/tn/tn1150.html
요약·해설
hfsplus.rst:1-61HFS+는 HFS를 32-bit allocation block, 255자 Unicode filename, `2^63` byte file size로 확장한 Macintosh filesystem입니다. mount option은 Finder 속성, 초기화되지 않은 permission structure의 UID/GID·umask, CD-ROM session·partition을 설정합니다.
Unicode filename은 `decompose`와 `nodecompose`로 normalization 표현을 선택하고 `nls`로 표시 encoding을 정합니다. `force`는 journalled 또는 locked volume의 write 보호를 우회하므로 data consistency 위험을 감수할 명확한 이유가 있을 때만 사용해야 합니다.
권한 초기값, filename 표현과 write 보호를 차례로 검토합니다.