OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [rc203soc/] [sw/] [uClinux/] [Documentation/] [filesystems/] [affs.txt] - Blame information for rev 1777

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1625 jcastillo
Amiga filesystems Overview
2
==========================
3
 
4
Not all varieties of the Amiga filesystems are supported for reading and
5
writing. The Amiga currently knows 6 different filesystems:
6
 
7
DOS\0           The old or original filesystem, not really suited for
8
                hard disks and normally not used on them, either.
9
                Supported read/write.
10
 
11
DOS\1           The original Fast File System. Supported read/write.
12
 
13
DOS\2           The old "international" filesystem. International means that
14
                a bug has been fixed so that accented ("international") letters
15
                in file names are case-insensitive, as they ought to be.
16
                Supported read/write.
17
 
18
DOS\3           The "international" Fast File System.  Supported read/write.
19
 
20
DOS\4           The original filesystem with directory cache. The directory
21
                cache speeds up directory accesses on floppies considerably,
22
                but slows down file creation/deletion. Doesn't make much
23
                sense on hard disks. Supported read only.
24
 
25
DOS\5           The Fast File System with directory cache. Supported read only.
26
 
27
All of the above filesystems allow block sizes from 512 to 32K bytes.
28
Supported block sizes are: 512, 1024, 2048 and 4096 bytes. Larger blocks
29
speed up almost everything with the expense of wasted disk space. The speed
30
gain above 4K seems not really worth the price, so you don't lose too
31
much here, either.
32
 
33
The muFS (multi user File System) equivalents of the above file systems
34
are supported, too.
35
 
36
Mount options for the AFFS
37
==========================
38
 
39
protect         If this option is set, the protection bits cannot be altered.
40
 
41
uid[=uid]       This sets the uid of the root directory (i. e. the mount point
42
                to uid or to the uid of the current user, if the =uid is
43
                omitted.
44
 
45
gid[=gid]       Same as above, but for gid.
46
 
47
setuid[=uid]    This sets the owner of all files and directories in the file
48
                system to uid or the uid of the current user, respectively.
49
 
50
setgid[=gid]    Same as above, but for gid.
51
 
52
mode=mode       Sets the mode flags to the given (octal) value, regardless
53
                of the original permissions. Directories will get an x
54
                permission, if the corresponding r bit is set.
55
                This is useful since most of the plain AmigaOS files
56
                will map to 600.
57
 
58
reserved=num    Sets the number of reserved blocks at the start of the
59
                partition to num. Default is 2.
60
 
61
root=block      Sets the block number of the root block. This should never
62
                be necessary.
63
 
64
bs=blksize      Sets the blocksize to blksize. Valid block sizes are 512,
65
                1024, 2048 and 4096. Like the root option, this should
66
                never be necessary, as the affs can figure it out itself.
67
 
68
quiet           The file system will not return an error for disallowed
69
                mode changes.
70
 
71
verbose         The volume name, file system type and block size will
72
                be written to the syslog.
73
 
74
prefix=path     Path will be prefixed to every absolute path name of
75
                symbolic links on an AFFS partition. Default = /
76
 
77
volume=name     When symbolic links with an absolute path are created
78
                on an AFFS partition, volume will be prepended as the
79
                volume name. Default = "" (empty string).
80
 
81
Handling of the Users/Groups and protection flags
82
=================================================
83
 
84
Amiga -> Linux:
85
 
86
The Amiga protection flags RWEDRWEDHSPARWED are handled as follows:
87
 
88
  - R maps to r for user, group and others. On directories, R implies x.
89
 
90
  - If both W and D are allowed, w will be set.
91
 
92
  - If both R and S are set, x will be set.
93
 
94
  - H, P and E are always retained and ignored under Linux.
95
 
96
  - A is always reset when written.
97
 
98
User id and group id will be used unless set[gu]id are given as mount
99
options. Since most of the Amiga file systems are single user systems
100
they will be owned by root.
101
 
102
Linux -> Amiga:
103
 
104
The Linux rwxrwxrwx file mode is handled as follows:
105
 
106
  - r permission will set R for user, group and others.
107
 
108
  - w permission will set W and D for user, group and others.
109
 
110
  - x permission of the user will set S for plain files.
111
 
112
  - All other flags (suid, sgid, ...) are ignored and will
113
    not be retained.
114
 
115
Newly created files and directories will get the user and group id
116
of the current user and a mode according to the umask.
117
 
118
Symbolic links
119
==============
120
 
121
Although the Amiga and Linux file systems resemble each other, there
122
are some, not always subtle, differences. One of them becomes apparent
123
with symbolic links. While Linux has a file system with exactly one
124
root directory, the Amiga has a separate root directory for each
125
file system (i. e. partition, floppy disk, ...). With the Amiga,
126
these entities are called "volumes". They have symbolic names which
127
can be used to access them. Thus, symbolic links can point to a
128
different volume. AFFS turns the volume name into a directory name
129
and prepends the prefix path (see prefix option) to it.
130
 
131
Example:
132
You mount all your Amiga partitions under /amiga/ (where
133
 is the name of the volume), and you give the option
134
"prefix=/amiga/" when mounting all your AFFS partitions. (They
135
might be "User", "WB" and "Graphics", the mount points /amiga/User,
136
/amiga/WB and /amiga/Graphics). A symbolic link referring to
137
"User:sc/include/dos/dos.h" will be followed to
138
"/amiga/User/sc/include/dos/dos.h".
139
 
140
Examples
141
========
142
 
143
Command line
144
    mount  Archive/Amiga/Workbench3.1.adf /mnt -t affs -o loop,reserved=4
145
    mount  /dev/sda3 /Amiga -t affs
146
 
147
/etc/fstab example
148
    /dev/sdb5   /d/f    affs    ro
149
 
150
Bugs, Restrictions, Caveats
151
===========================
152
 
153
Quite a few things may not work as advertised. Not everything is
154
tested, though several hundred MB have been read and written using
155
this fs.
156
 
157
Filenames are truncated to 30 characters without warning.
158
 
159
Currently there are no checks against invalid characters (':')
160
in filenames.
161
 
162
Case is ignored by the affs in filename matching, but Linux shells
163
do care about the case. Example (with /mnt being an affs mounted fs):
164
    rm /mnt/WRONGCASE
165
will remove /mnt/wrongcase, but
166
    rm /mnt/WR*
167
will not since the names are matched by the shell.
168
 
169
The block allocation is designed for hard disk partitions. If more
170
than 1 process writes to a (small) diskette, the blocks are allocated
171
in an ugly way (but the real AFFS doesn't do much better). This
172
is also true when space gets tight.
173
 
174
The bitmap valid flag in the root block may not be accurate when the
175
system crashes while an affs partition is mounted. There's currently
176
no way to fix this without an Amiga (disk validator) or manually
177
(who would do this?). Maybe later.
178
 
179
A fsck.affs and mkfs.affs will probably be available in the future.
180
Until then, you should do
181
    ln -s /bin/true /etc/fs/mkfs.affs
182
 
183
It's not possible to read floppy disks with a normal PC or workstation
184
due to an incompatibility with the Amiga floppy controller.
185
 
186
If you are interested in an Amiga Emulator for Linux, look at
187
 
188
http://www-users.informatik.rwth-aachen.de/~crux/uae.html

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.