요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
.. SPDX-License-Identifier: GPL-2.0
===============================
Acorn Disc Filing System - ADFS
===============================
Filesystems supported by ADFS
-----------------------------
The ADFS module supports the following Filecore formats which have:
- new maps
- new directories or big directories
In terms of the named formats, this means we support:
- E and E+, with or without boot block
- F and F+
We fully support reading files from these filesystems, and writing to
existing files within their existing allocation. Essentially, we do
not support changing any of the filesystem metadata.
This is intended to support loopback mounted Linux native filesystems
on a RISC OS Filecore filesystem, but will allow the data within files
to be changed.
If write support (ADFS_FS_RW) is configured, we allow rudimentary
directory updates, specifically updating the access mode and timestamp.
Mount options for ADFS
----------------------
============ ======================================================
uid=nnn All files in the partition will be owned by
user id nnn. Default 0 (root).
gid=nnn All files in the partition will be in group
nnn. Default 0 (root).
ownmask=nnn The permission mask for ADFS 'owner' permissions
will be nnn. Default 0700.
othmask=nnn The permission mask for ADFS 'other' permissions
will be nnn. Default 0077.
ftsuffix=n When ftsuffix=0, no file type suffix will be applied.
When ftsuffix=1, a hexadecimal suffix corresponding to
the RISC OS file type will be added. Default 0.
============ ======================================================
Mapping of ADFS permissions to Linux permissions
------------------------------------------------
ADFS permissions consist of the following:
- Owner read
- Owner write
- Other read
- Other write
(In older versions, an 'execute' permission did exist, but this
does not hold the same meaning as the Linux 'execute' permission
and is now obsolete).
The mapping is performed as follows::
Owner read -> -r--r--r--
Owner write -> --w--w---w
Owner read and filetype UnixExec -> ---x--x--x
These are then masked by ownmask, eg 700 -> -rwx------
Possible owner mode permissions -> -rwx------
Other read -> -r--r--r--
Other write -> --w--w--w-
Other read and filetype UnixExec -> ---x--x--x
These are then masked by othmask, eg 077 -> ----rwxrwx
Possible other mode permissions -> ----rwxrwx
Hence, with the default masks, if a file is owner read/write, and
not a UnixExec filetype, then the permissions will be::
-rw-------
However, if the masks were ownmask=0770,othmask=0007, then this would
be modified to::
-rw-rw----
There is no restriction on what you can do with these masks. You may
wish that either read bits give read access to the file for all, but
keep the default write protection (ownmask=0755,othmask=0577)::
-rw-r--r--
You can therefore tailor the permission translation to whatever you
desire the permissions should be under Linux.
RISC OS file type suffix
------------------------
RISC OS file types are stored in bits 19..8 of the file load address.
To enable non-RISC OS systems to be used to store files without losing
file type information, a file naming convention was devised (initially
for use with NFS) such that a hexadecimal suffix of the form ,xyz
denoted the file type: e.g. BasicFile,ffb is a BASIC (0xffb) file. This
naming convention is now also used by RISC OS emulators such as RPCEmu.
Mounting an ADFS disc with option ftsuffix=1 will cause appropriate file
type suffixes to be appended to file names read from a directory. If the
ftsuffix option is zero or omitted, no file type suffixes will be added.
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.
지원 Filecore format과 write 범위
1-30ADFS module은 new map과 new directory 또는 big directory를 쓰는 Filecore format을 지원합니다. 이름으로는 boot block 유무와 무관한 E/E+ 및 F/F+입니다.
file read는 완전히 지원하고, 기존 file에는 이미 할당된 공간 안에서 write할 수 있습니다. filesystem metadata 자체를 변경하는 기능은 본질적으로 지원하지 않습니다.
주 용도는 RISC OS Filecore filesystem 안에 Linux native filesystem image를 두고 loopback mount하는 것입니다. 이 경우 file 내부 data는 바꿀 수 있습니다. `ADFS_FS_RW`를 구성하면 access mode와 timestamp 갱신 같은 제한적인 directory update도 허용합니다.
format과 read/write 제약을 구조화했습니다.
.. SPDX-License-Identifier: GPL-2.0
===============================
Acorn Disc Filing System - ADFS
===============================
Filesystems supported by ADFS
-----------------------------
The ADFS module supports the following Filecore formats which have:
- new maps
- new directories or big directories
In terms of the named formats, this means we support:
- E and E+, with or without boot block
- F and F+
We fully support reading files from these filesystems, and writing to
existing files within their existing allocation. Essentially, we do
not support changing any of the filesystem metadata.
This is intended to support loopback mounted Linux native filesystems
on a RISC OS Filecore filesystem, but will allow the data within files
to be changed.
If write support (ADFS_FS_RW) is configured, we allow rudimentary
directory updates, specifically updating the access mode and timestamp.
ADFS mount option
31-47`uid=nnn`은 partition의 모든 file owner UID이며 기본값은 root인 0입니다. `gid=nnn`은 모든 file의 group GID이며 역시 기본값은 0입니다.
`ownmask=nnn`은 ADFS owner permission mask이고 기본값은 `0700`입니다. `othmask=nnn`은 other permission mask이며 기본값은 `0077`입니다.
`ftsuffix=0`은 file type suffix를 붙이지 않는 기본값입니다. `ftsuffix=1`은 RISC OS file type에 대응하는 hexadecimal suffix를 붙입니다.
원문의 option, 효과와 기본값입니다.
Mount options for ADFS
----------------------
============ ======================================================
uid=nnn All files in the partition will be owned by
user id nnn. Default 0 (root).
gid=nnn All files in the partition will be in group
nnn. Default 0 (root).
ownmask=nnn The permission mask for ADFS 'owner' permissions
will be nnn. Default 0700.
othmask=nnn The permission mask for ADFS 'other' permissions
will be nnn. Default 0077.
ftsuffix=n When ftsuffix=0, no file type suffix will be applied.
When ftsuffix=1, a hexadecimal suffix corresponding to
the RISC OS file type will be added. Default 0.
============ ======================================================
ADFS permission의 Linux mode 변환
48-94ADFS permission은 owner read/write와 other read/write 네 가지입니다. 과거의 execute bit는 Linux execute와 의미가 같지 않고 현재는 obsolete입니다.
owner read는 user/group/other의 `r`로, owner write는 각 범주의 `w`로 mapping됩니다. owner read인 file의 type이 `UnixExec`이면 각 범주의 `x`도 설정합니다. 그 결과를 `ownmask`로 제한하며 기본 `0700`에서는 가능한 owner mode가 `-rwx------`입니다.
other read와 write도 각각 모든 범주의 `r`와 `w`로 먼저 mapping하고 `UnixExec`이면 `x`를 더한 뒤 `othmask`로 제한합니다. 기본 `0077`에서 가능한 other mode는 `----rwxrwx`입니다.
기본 mask에서 owner read/write이고 `UnixExec`이 아닌 file은 `-rw-------`가 됩니다. `ownmask=0770,othmask=0007`이면 `-rw-rw----`, read bit를 모두에게 허용하면서 기본 write 보호를 유지하려고 `ownmask=0755,othmask=0577`을 쓰면 `-rw-r--r--`가 됩니다.
mask 값에는 별도 제한이 없으므로 Linux에서 원하는 permission 결과에 맞게 변환을 조정할 수 있습니다.
ADFS bit, 중간 Linux mode와 mask 적용 결과입니다.
Mapping of ADFS permissions to Linux permissions
------------------------------------------------
ADFS permissions consist of the following:
- Owner read
- Owner write
- Other read
- Other write
(In older versions, an 'execute' permission did exist, but this
does not hold the same meaning as the Linux 'execute' permission
and is now obsolete).
The mapping is performed as follows::
Owner read -> -r--r--r--
Owner write -> --w--w---w
Owner read and filetype UnixExec -> ---x--x--x
These are then masked by ownmask, eg 700 -> -rwx------
Possible owner mode permissions -> -rwx------
Other read -> -r--r--r--
Other write -> --w--w--w-
Other read and filetype UnixExec -> ---x--x--x
These are then masked by othmask, eg 077 -> ----rwxrwx
Possible other mode permissions -> ----rwxrwx
Hence, with the default masks, if a file is owner read/write, and
not a UnixExec filetype, then the permissions will be::
-rw-------
However, if the masks were ownmask=0770,othmask=0007, then this would
be modified to::
-rw-rw----
There is no restriction on what you can do with these masks. You may
wish that either read bits give read access to the file for all, but
keep the default write protection (ownmask=0755,othmask=0577)::
-rw-r--r--
You can therefore tailor the permission translation to whatever you
desire the permissions should be under Linux.
RISC OS file type suffix
95-108RISC OS file type은 file load address의 bit 19..8에 저장됩니다. non-RISC OS system에서도 이 정보를 잃지 않고 file을 저장하도록 NFS용으로 처음 만든 naming convention이 hexadecimal `,xyz` suffix를 사용합니다.
예를 들어 `BasicFile,ffb`는 file type `0xffb`인 BASIC file입니다. 이 convention은 RPCEmu 같은 RISC OS emulator에서도 사용합니다.
ADFS disk를 `ftsuffix=1`로 mount하면 directory에서 읽은 filename에 적절한 type suffix를 붙입니다. option을 0으로 설정하거나 생략하면 suffix를 붙이지 않습니다.
load address의 type bit가 filename suffix로 표현되는 과정입니다.
RISC OS file type suffix
------------------------
RISC OS file types are stored in bits 19..8 of the file load address.
To enable non-RISC OS systems to be used to store files without losing
file type information, a file naming convention was devised (initially
for use with NFS) such that a hexadecimal suffix of the form ,xyz
denoted the file type: e.g. BasicFile,ffb is a BASIC (0xffb) file. This
naming convention is now also used by RISC OS emulators such as RPCEmu.
Mounting an ADFS disc with option ftsuffix=1 will cause appropriate file
type suffixes to be appended to file names read from a directory. If the
ftsuffix option is zero or omitted, no file type suffixes will be added.
요약·해설
adfs.rst:1-108ADFS는 RISC OS Filecore E/E+/F/F+를 읽고 기존 allocation 안에서 write하며, UID/GID·permission mask와 file type suffix를 Linux 표현으로 변환합니다.
지원 범위와 변환 option입니다.