Documentation: update adfs filesystem documentation
[linux-2.6-microblaze.git] / Documentation / filesystems / adfs.txt
1 Filesystems supported by ADFS
2 -----------------------------
3
4 The ADFS module supports the following Filecore formats which have:
5
6 - new maps
7 - new directories or big directories
8
9 In terms of the named formats, this means we support:
10
11 - E and E+, with or without boot block
12 - F and F+
13
14 We fully support reading files from these filesystems, and writing to
15 existing files within their existing allocation.  Essentially, we do
16 not support changing any of the filesystem metadata.
17
18 This is intended to support loopback mounted Linux native filesystems
19 on a RISC OS Filecore filesystem, but will allow the data within files
20 to be changed.
21
22 If write support (ADFS_FS_RW) is configured, we allow rudimentary
23 directory updates, specifically updating the access mode and timestamp.
24
25 Mount options for ADFS
26 ----------------------
27
28   uid=nnn       All files in the partition will be owned by
29                 user id nnn.  Default 0 (root).
30   gid=nnn       All files in the partition will be in group
31                 nnn.  Default 0 (root).
32   ownmask=nnn   The permission mask for ADFS 'owner' permissions
33                 will be nnn.  Default 0700.
34   othmask=nnn   The permission mask for ADFS 'other' permissions
35                 will be nnn.  Default 0077.
36   ftsuffix=n    When ftsuffix=0, no file type suffix will be applied.
37                 When ftsuffix=1, a hexadecimal suffix corresponding to
38                 the RISC OS file type will be added.  Default 0.
39
40 Mapping of ADFS permissions to Linux permissions
41 ------------------------------------------------
42
43   ADFS permissions consist of the following:
44
45         Owner read
46         Owner write
47         Other read
48         Other write
49
50   (In older versions, an 'execute' permission did exist, but this
51    does not hold the same meaning as the Linux 'execute' permission
52    and is now obsolete).
53
54   The mapping is performed as follows:
55
56         Owner read                              -> -r--r--r--
57         Owner write                             -> --w--w---w
58         Owner read and filetype UnixExec        -> ---x--x--x
59     These are then masked by ownmask, eg 700    -> -rwx------
60         Possible owner mode permissions         -> -rwx------
61
62         Other read                              -> -r--r--r--
63         Other write                             -> --w--w--w-
64         Other read and filetype UnixExec        -> ---x--x--x
65     These are then masked by othmask, eg 077    -> ----rwxrwx
66         Possible other mode permissions         -> ----rwxrwx
67
68   Hence, with the default masks, if a file is owner read/write, and
69   not a UnixExec filetype, then the permissions will be:
70
71                         -rw-------
72
73   However, if the masks were ownmask=0770,othmask=0007, then this would
74   be modified to:
75                         -rw-rw----
76
77   There is no restriction on what you can do with these masks.  You may
78   wish that either read bits give read access to the file for all, but
79   keep the default write protection (ownmask=0755,othmask=0577):
80
81                         -rw-r--r--
82
83   You can therefore tailor the permission translation to whatever you
84   desire the permissions should be under Linux.
85
86 RISC OS file type suffix
87 ------------------------
88
89   RISC OS file types are stored in bits 19..8 of the file load address.
90
91   To enable non-RISC OS systems to be used to store files without losing
92   file type information, a file naming convention was devised (initially
93   for use with NFS) such that a hexadecimal suffix of the form ,xyz
94   denoted the file type: e.g. BasicFile,ffb is a BASIC (0xffb) file.  This
95   naming convention is now also used by RISC OS emulators such as RPCEmu.
96
97   Mounting an ADFS disc with option ftsuffix=1 will cause appropriate file
98   type suffixes to be appended to file names read from a directory.  If the
99   ftsuffix option is zero or omitted, no file type suffixes will be added.