요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
.. SPDX-License-Identifier: GPL-2.0
===============
UDF file system
===============
If you encounter problems with reading UDF discs using this driver,
please report them according to MAINTAINERS file.
Write support requires a block driver which supports writing. Currently
dvd+rw drives and media support true random sector writes, and so a udf
filesystem on such devices can be directly mounted read/write. CD-RW
media however, does not support this. Instead the media can be formatted
for packet mode using the utility cdrwtool, then the pktcdvd driver can
be bound to the underlying cd device to provide the required buffering
and read-modify-write cycles to allow the filesystem random sector writes
while providing the hardware with only full packet writes. While not
required for dvd+rw media, use of the pktcdvd driver often enhances
performance due to very poor read-modify-write support supplied internally
by drive firmware.
-------------------------------------------------------------------------------
The following mount options are supported:
=========== ======================================
gid= Set the default group.
umask= Set the default umask.
mode= Set the default file permissions.
dmode= Set the default directory permissions.
uid= Set the default user.
bs= Set the block size.
unhide Show otherwise hidden files.
undelete Show deleted files in lists.
adinicb Embed data in the inode (default)
noadinicb Don't embed data in the inode
shortad Use short ad's
longad Use long ad's (default)
nostrict Unset strict conformance
iocharset= Set the NLS character set
=========== ======================================
The uid= and gid= options need a bit more explaining. They will accept a
decimal numeric value and all inodes on that mount will then appear as
belonging to that uid and gid. Mount options also accept the string "forget".
The forget option causes all IDs to be written to disk as -1 which is a way
of UDF standard to indicate that IDs are not supported for these files .
For typical desktop use of removable media, you should set the ID to that of
the interactively logged on user, and also specify the forget option. This way
the interactive user will always see the files on the disk as belonging to him.
The remaining are for debugging and disaster recovery:
===== ================================
novrs Skip volume sequence recognition
===== ================================
The following expect a offset from 0.
========== =================================================
session= Set the CDROM session (default= last session)
anchor= Override standard anchor location. (default= 256)
lastblock= Set the last block of the filesystem/
========== =================================================
-------------------------------------------------------------------------------
For the latest version and toolset see:
https://github.com/pali/udftools
Documentation on UDF and ECMA 167 is available FREE from:
- http://www.osta.org/
- https://www.ecma-international.org/
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.
UDF 쓰기 지원과 광학 매체
1-20이 드라이버로 UDF 디스크를 읽는 데 문제가 생기면 `MAINTAINERS` 파일의 절차에 따라 보고해야 한다.
쓰기 지원에는 쓰기 기능을 제공하는 block driver가 필요하다. 현재 DVD+RW 드라이브와 매체는 진정한 임의 sector 쓰기를 지원하므로, 이런 장치의 UDF 파일 시스템은 읽기·쓰기 모드로 직접 마운트할 수 있다.
반면 CD-RW 매체는 임의 sector 쓰기를 직접 지원하지 않는다. 먼저 `cdrwtool` 유틸리티로 매체를 packet mode로 포맷한 뒤, 하위 CD 장치에 `pktcdvd` 드라이버를 연결해야 한다. `pktcdvd`는 필요한 buffering과 read-modify-write 주기를 제공한다.
이 구성에서 파일 시스템은 임의 sector 쓰기를 수행하는 것처럼 동작하지만, 하드웨어에는 완전한 packet 단위 쓰기만 전달된다. DVD+RW에는 `pktcdvd`가 필수는 아니지만, 드라이브 firmware 내부의 read-modify-write 구현 성능이 매우 낮은 경우가 많아 `pktcdvd`를 사용하면 성능이 향상되기도 한다.
매체가 임의 sector 쓰기를 직접 제공하는지에 따라 필요한 계층이 달라진다.
파일 시스템의 임의 쓰기를 하드웨어가 처리할 수 있는 packet 쓰기로 변환한다.
.. SPDX-License-Identifier: GPL-2.0
===============
UDF file system
===============
If you encounter problems with reading UDF discs using this driver,
please report them according to MAINTAINERS file.
Write support requires a block driver which supports writing. Currently
dvd+rw drives and media support true random sector writes, and so a udf
filesystem on such devices can be directly mounted read/write. CD-RW
media however, does not support this. Instead the media can be formatted
for packet mode using the utility cdrwtool, then the pktcdvd driver can
be bound to the underlying cd device to provide the required buffering
and read-modify-write cycles to allow the filesystem random sector writes
while providing the hardware with only full packet writes. While not
required for dvd+rw media, use of the pktcdvd driver often enhances
performance due to very poor read-modify-write support supplied internally
by drive firmware.
일반 마운트 옵션과 소유권
21-52UDF는 기본 group을 지정하는 `gid=`, 기본 umask를 지정하는 `umask=`, 기본 file permission을 지정하는 `mode=`, 기본 directory permission을 지정하는 `dmode=`, 기본 user를 지정하는 `uid=`, block size를 지정하는 `bs=`를 지원한다.
`unhide`는 원래 숨겨진 파일을 표시하고, `undelete`는 목록에서 삭제된 파일을 표시한다. `adinicb`는 데이터를 inode에 내장하며 기본값이다. `noadinicb`는 데이터를 inode에 내장하지 않는다. `shortad`는 short allocation descriptor를 사용하고, 기본값인 `longad`는 long allocation descriptor를 사용한다.
`nostrict`는 엄격한 표준 준수를 해제하고, `iocharset=`은 NLS 문자 집합을 지정한다.
`uid=`와 `gid=`에는 십진수 값을 줄 수 있다. 그러면 해당 마운트의 모든 inode가 지정한 uid와 gid의 소유로 보인다. 두 옵션은 문자열 `forget`도 받는다. `forget`을 지정하면 모든 ID를 디스크에 `-1`로 기록하는데, 이는 해당 파일에서 ID를 지원하지 않는다는 UDF 표준의 표현이다.
이동식 매체를 일반 데스크톱에서 사용할 때는 ID를 대화형 로그인 사용자의 값으로 설정하고 `forget`도 지정하는 것이 좋다. 그러면 어느 시스템에서 매체를 사용하더라도 현재 대화형 사용자가 디스크의 파일을 자신의 소유로 보게 할 수 있다.
권한, 표시, 자료 배치와 문자 집합 관련 옵션을 기능별로 정리한다.
`forget`은 디스크에 특정 시스템의 ID를 고정하지 않기 위한 UDF 방식이다.
-------------------------------------------------------------------------------
The following mount options are supported:
=========== ======================================
gid= Set the default group.
umask= Set the default umask.
mode= Set the default file permissions.
dmode= Set the default directory permissions.
uid= Set the default user.
bs= Set the block size.
unhide Show otherwise hidden files.
undelete Show deleted files in lists.
adinicb Embed data in the inode (default)
noadinicb Don't embed data in the inode
shortad Use short ad's
longad Use long ad's (default)
nostrict Unset strict conformance
iocharset= Set the NLS character set
=========== ======================================
The uid= and gid= options need a bit more explaining. They will accept a
decimal numeric value and all inodes on that mount will then appear as
belonging to that uid and gid. Mount options also accept the string "forget".
The forget option causes all IDs to be written to disk as -1 which is a way
of UDF standard to indicate that IDs are not supported for these files .
For typical desktop use of removable media, you should set the ID to that of
the interactively logged on user, and also specify the forget option. This way
the interactive user will always see the files on the disk as belonging to him.
디버깅과 재해 복구 옵션
53-67나머지 옵션은 디버깅과 재해 복구를 위한 것이다. `novrs`는 volume sequence recognition을 건너뛴다.
`session=`, `anchor=`, `lastblock=`은 0부터 시작하는 오프셋을 기대한다. `session=`은 CD-ROM session을 지정하며 기본값은 마지막 session이다. `anchor=`는 표준 anchor 위치를 덮어쓰며 기본값은 256이다. `lastblock=`은 파일 시스템의 마지막 block을 지정한다.
이 옵션들은 손상되었거나 비표준 배치인 매체를 진단하고 복구할 때 사용한다. 일반 마운트에서는 기본 인식 경로를 유지하고, 실제 매체 배치를 확인한 경우에만 오프셋을 덮어쓰는 편이 안전하다.
자동 인식이나 표준 위치를 우회하는 진단용 설정이다.
The remaining are for debugging and disaster recovery:
===== ================================
novrs Skip volume sequence recognition
===== ================================
The following expect a offset from 0.
========== =================================================
session= Set the CDROM session (default= last session)
anchor= Override standard anchor location. (default= 256)
lastblock= Set the last block of the filesystem/
========== =================================================
-------------------------------------------------------------------------------
도구와 표준 참고 자료
68-75최신 UDF 도구 모음은 `https://github.com/pali/udftools`에서 확인할 수 있다. UDF와 ECMA 167 문서는 `http://www.osta.org/` 및 `https://www.ecma-international.org/`에서 무료로 제공된다. 주소와 프로토콜은 원문 그대로 보존했다.
For the latest version and toolset see:
https://github.com/pali/udftools
Documentation on UDF and ECMA 167 is available FREE from:
- http://www.osta.org/
- https://www.ecma-international.org/
요약·해설
udf.rst:1-75UDF의 쓰기 가능 여부는 파일 시스템만이 아니라 광학 매체와 block driver의 쓰기 모델에 달려 있다. DVD+RW는 직접 임의 sector 쓰기가 가능하지만, CD-RW는 packet mode 포맷과 `pktcdvd`의 buffering·read-modify-write 변환이 필요하다.
일반 마운트 옵션은 소유권, 권한, 숨김·삭제 파일 표시, inode 내장 데이터, allocation descriptor와 문자 집합을 제어한다. 이동식 매체에서는 로그인 사용자의 uid·gid와 `forget`을 함께 사용해 특정 시스템의 ID를 디스크에 고정하지 않을 수 있다.
`novrs`, `session=`, `anchor=`, `lastblock=`은 디버깅과 재해 복구용이다. 특히 세 위치 옵션은 0부터 시작하는 오프셋이므로 실제 매체 구조를 확인한 뒤 사용해야 한다.
매체 유형과 목적에 따라 마운트 준비가 달라진다.