7 * Answer the 'System V and Coherent filesystem support' question with 'y'
8 when configuring the kernel.
9 * To mount a disk or a partition, use
10 mount [-r] -t sysv device mountpoint
11 The file system type names
15 may be used interchangeably, but the last two will eventually disappear.
17 Bugs in the present implementation:
19 - The "free list interleave" n:m is currently ignored.
20 - Only file systems with no filesystem name and no pack name are recognized.
21 (See Coherent "man mkfs" for a description of these features.)
22 - SystemV Release 2 FS:
23 The superblock is only searched in the blocks 9, 15, 18, which
24 corresponds to the beginning of track 1 on floppy disks. No support
25 for this FS on hard disk yet.
28 These filesystems are rather similar. Here is a comparison with Minix FS:
30 * Linux fdisk reports on partitions
31 - Minix FS 0x81 Linux/Minix
34 - Coherent FS 0x08 AIX bootable
36 * Size of a block or zone (data allocation unit on disk)
38 - Xenix FS 1024 (also 512 ??)
39 - SystemV FS 1024 (also 512 and 2048)
42 * General layout: all have one boot block, one super block and
43 separate areas for inodes and for directories/data.
44 On SystemV Release 2 FS (e.g. Microport) the first track is reserved and
45 all the block numbers (including the super block) are offset by one track.
47 * Byte ordering of "short" (16 bit entities) on disk:
48 - Minix FS little endian 0 1
49 - Xenix FS little endian 0 1
50 - SystemV FS little endian 0 1
51 - Coherent FS little endian 0 1
52 Of course, this affects only the file system, not the data of files on it!
54 * Byte ordering of "long" (32 bit entities) on disk:
55 - Minix FS little endian 0 1 2 3
56 - Xenix FS little endian 0 1 2 3
57 - SystemV FS little endian 0 1 2 3
58 - Coherent FS PDP-11 2 3 0 1
59 Of course, this affects only the file system, not the data of files on it!
61 * Inode on disk: "short", 0 means non-existent, the root dir ino is:
63 - Xenix FS, SystemV FS, Coherent FS 2
65 * Maximum number of hard links to a file:
71 * Free inode management:
73 - Xenix FS, SystemV FS, Coherent FS
74 There is a cache of a certain number of free inodes in the super-block.
75 When it is exhausted, new free inodes are found using a linear search.
77 * Free block management:
79 - Xenix FS, SystemV FS, Coherent FS
80 Free blocks are organized in a "free list". Maybe a misleading term,
81 since it is not true that every free block contains a pointer to
82 the next free block. Rather, the free blocks are organized in chunks
83 of limited size, and every now and then a free block contains pointers
84 to the free blocks pertaining to the next chunk; the first of these
85 contains pointers and so on. The list terminates with a "block number"
86 0 on Xenix FS and SystemV FS, with a block zeroed out on Coherent FS.
88 * Super-block location:
89 - Minix FS block 1 = bytes 1024..2047
90 - Xenix FS block 1 = bytes 1024..2047
91 - SystemV FS bytes 512..1023
92 - Coherent FS block 1 = bytes 512..1023
96 unsigned short s_ninodes;
97 unsigned short s_nzones;
98 unsigned short s_imap_blocks;
99 unsigned short s_zmap_blocks;
100 unsigned short s_firstdatazone;
101 unsigned short s_log_zone_size;
102 unsigned long s_max_size;
103 unsigned short s_magic;
104 - Xenix FS, SystemV FS, Coherent FS
105 unsigned short s_firstdatazone;
106 unsigned long s_nzones;
107 unsigned short s_fzone_count;
108 unsigned long s_fzones[NICFREE];
109 unsigned short s_finode_count;
110 unsigned short s_finodes[NICINOD];
115 unsigned long s_time;
116 short s_dinfo[4]; -- SystemV FS only
117 unsigned long s_free_zones;
118 unsigned short s_free_inodes;
119 short s_dinfo[4]; -- Xenix FS only
120 unsigned short s_interleave_m,s_interleave_n; -- Coherent FS only
123 then they differ considerably:
130 long s_fill[12 or 14];
135 unsigned long s_unique;
136 Note that Coherent FS has no magic.
140 unsigned short i_mode;
141 unsigned short i_uid;
142 unsigned long i_size;
143 unsigned long i_time;
145 unsigned char i_nlinks;
146 unsigned short i_zone[7+1+1];
147 - Xenix FS, SystemV FS, Coherent FS
148 unsigned short i_mode;
149 unsigned short i_nlink;
150 unsigned short i_uid;
151 unsigned short i_gid;
152 unsigned long i_size;
153 unsigned char i_zone[3*(10+1+1+1)];
154 unsigned long i_atime;
155 unsigned long i_mtime;
156 unsigned long i_ctime;
158 * Regular file data blocks are organized as
161 1 indirect block (pointers to blocks)
162 1 double-indirect block (pointer to pointers to blocks)
163 - Xenix FS, SystemV FS, Coherent FS
165 1 indirect block (pointers to blocks)
166 1 double-indirect block (pointer to pointers to blocks)
167 1 triple-indirect block (pointer to pointers to pointers to blocks)
169 * Inode size, inodes per block
175 * Directory entry on disk
177 unsigned short inode;
179 - Xenix FS, SystemV FS, Coherent FS
180 unsigned short inode;
183 * Dir entry size, dir entries per block
184 - Minix FS 16/32 64/32
189 * How to implement symbolic links such that the host fsck doesn't scream:
191 - Xenix FS kludge: as regular files with chmod 1000
193 - Coherent FS kludge: as regular files with chmod 1000
196 Notation: We often speak of a "block" but mean a zone (the allocation unit)
197 and not the disk driver's notion of "block".