← Documents Documentation/filesystems/hfsplus.rst GitHub 원문 ↗

Linux 6.18.37 · Filesystems

Macintosh HFSPlus Filesystem for Linux

HFS+ 확장 범위, permission 초기값, Unicode filename과 write 보호 mount option을 설명하는 전문 번역입니다.

Source pathDocumentation/filesystems/hfsplus.rst
Source versionLinux v6.18.37
TranslationDUJINLABS 전문 번역 + 해설

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

1. 요약·해설

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

요약·해설

hfsplus.rst:1-61

HFS+는 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 위험을 감수할 명확한 이유가 있을 때만 사용해야 합니다.

HFS+ mount 점검 순서
Finder creator/type 필요 여부 확인초기화되지 않은 permission에 적용할 UID/GID·umask 결정CD-ROM이면 session·partition 선택Unicode decomposition과 NLS encoding 선택journalled·locked volume에는 기본 write 보호 유지

권한 초기값, filename 표현과 write 보호를 차례로 검토합니다.

2. 영어 원문 전체

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

원문 전체 펼치기
1 .. SPDX-License-Identifier: GPL-2.0
2
3 ======================================
4 Macintosh HFSPlus Filesystem for Linux
5 ======================================
6
7 HFSPlus is a filesystem first introduced in MacOS 8.1.
8 HFSPlus has several extensions to HFS, including 32-bit allocation
9 blocks, 255-character unicode filenames, and file sizes of 2^63 bytes.
10
11
12 Mount options
13 =============
14
15 When mounting an HFSPlus filesystem, the following options are accepted:
16
17 creator=cccc, type=cccc
18 Specifies the creator/type values as shown by the MacOS finder
19 used for creating new files. Default values: '????'.
20
21 uid=n, gid=n
22 Specifies the user/group that owns all files on the filesystem
23 that have uninitialized permissions structures.
24 Default: user/group id of the mounting process.
25
26 umask=n
27 Specifies the umask (in octal) used for files and directories
28 that have uninitialized permissions structures.
29 Default: umask of the mounting process.
30
31 session=n
32 Select the CDROM session to mount as HFSPlus filesystem. Defaults to
33 leaving that decision to the CDROM driver. This option will fail
34 with anything but a CDROM as underlying devices.
35
36 part=n
37 Select partition number n from the devices. This option only makes
38 sense for CDROMs because they can't be partitioned under Linux.
39 For disk devices the generic partition parsing code does this
40 for us. Defaults to not parsing the partition table at all.
41
42 decompose
43 Decompose file name characters.
44
45 nodecompose
46 Do not decompose file name characters.
47
48 force
49 Used to force write access to volumes that are marked as journalled
50 or locked. Use at your own risk.
51
52 nls=cccc
53 Encoding to use when presenting file names.
54
55
56 References
57 ==========
58
59 kernel source: <file:fs/hfsplus>
60
61 Apple Technote 1150 https://developer.apple.com/legacy/library/technotes/tn/tn1150.html
62

3. 한국어 전문 번역

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

HFS+ 확장점과 기본 mount option

1-40

HFSPlus(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에서 HFS+로 확장된 범위
항목HFS+ 지원 범위의미
Allocation block32-bit더 큰 volume allocation 공간
Filename255-character Unicode긴 다국어 file name
File size`2^63` bytes64-bit 계열의 대용량 file

원문이 강조하는 HFS+의 세 가지 확장입니다.

HFS+ 기본 mount option
Option적용 대상Default·제약
`creator=cccc`, `type=cccc`새 file의 Finder creator/type`'????'`
`uid=n`, `gid=n`permission structure가 초기화되지 않은 항목mount process의 UID/GID
`umask=n`permission structure가 초기화되지 않은 file·directorymount process의 umask; 8진수
`session=n`HFS+ CD-ROM sessionCD-ROM driver에 위임; CD-ROM 전용
`part=n`CD-ROM partition number기본적으로 partition table을 해석하지 않음

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`이 제시됩니다.

HFS+ filename과 write option
Option동작주의점
`decompose`filename character 분해Unicode normalization 표현 변경
`nodecompose`filename character를 분해하지 않음`decompose`와 반대
`nls=cccc`filename 표시 encoding 지정선택한 NLS encoding 사용
`force`journalled·locked volume에 write 강제data consistency 위험; 사용자 책임

Unicode 표시 방식과 위험한 강제 쓰기 동작을 구분합니다.

HFS+ mount 시 filename 정책 선택
volume의 filename 표현 요구 확인`decompose` 또는 `nodecompose` 선택필요하면 `nls=cccc`로 표시 encoding 지정journalled·locked 상태면 기본 write 보호 유지`force`는 위험을 이해한 경우에만 사용

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