diff options
author | Adrian Bunk <bunk@stusta.de> | 2006-12-06 23:40:01 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.osdl.org> | 2006-12-07 11:39:44 -0500 |
commit | 3982cd99c30285ebc71d405cd8530a3dfb7265de (patch) | |
tree | 288eb99e0c77acb7c58f1820d5579ce161e6a88e /Documentation/filesystems/sysv-fs.txt | |
parent | f1a60dbf68061e5a5364cbc723786b355637ffd3 (diff) |
[PATCH] fs/sysv/: doc cleanup
Remove two different changelog files from fs/sysv/ and merges the INTRO
file into Documentation/filesystems/sysv-fs.txt
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Cc: Christoph Hellwig <hch@lst.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'Documentation/filesystems/sysv-fs.txt')
-rw-r--r-- | Documentation/filesystems/sysv-fs.txt | 177 |
1 files changed, 168 insertions, 9 deletions
diff --git a/Documentation/filesystems/sysv-fs.txt b/Documentation/filesystems/sysv-fs.txt index d8172241801..253b50d1328 100644 --- a/Documentation/filesystems/sysv-fs.txt +++ b/Documentation/filesystems/sysv-fs.txt | |||
@@ -1,11 +1,8 @@ | |||
1 | This is the implementation of the SystemV/Coherent filesystem for Linux. | ||
2 | It implements all of | 1 | It implements all of |
3 | - Xenix FS, | 2 | - Xenix FS, |
4 | - SystemV/386 FS, | 3 | - SystemV/386 FS, |
5 | - Coherent FS. | 4 | - Coherent FS. |
6 | 5 | ||
7 | This is version beta 4. | ||
8 | |||
9 | To install: | 6 | To install: |
10 | * Answer the 'System V and Coherent filesystem support' question with 'y' | 7 | * Answer the 'System V and Coherent filesystem support' question with 'y' |
11 | when configuring the kernel. | 8 | when configuring the kernel. |
@@ -28,11 +25,173 @@ Bugs in the present implementation: | |||
28 | for this FS on hard disk yet. | 25 | for this FS on hard disk yet. |
29 | 26 | ||
30 | 27 | ||
31 | Please report any bugs and suggestions to | 28 | These filesystems are rather similar. Here is a comparison with Minix FS: |
32 | Bruno Haible <haible@ma2s2.mathematik.uni-karlsruhe.de> | 29 | |
33 | Pascal Haible <haible@izfm.uni-stuttgart.de> | 30 | * Linux fdisk reports on partitions |
34 | Krzysztof G. Baranowski <kgb@manjak.knm.org.pl> | 31 | - Minix FS 0x81 Linux/Minix |
32 | - Xenix FS ?? | ||
33 | - SystemV FS ?? | ||
34 | - Coherent FS 0x08 AIX bootable | ||
35 | |||
36 | * Size of a block or zone (data allocation unit on disk) | ||
37 | - Minix FS 1024 | ||
38 | - Xenix FS 1024 (also 512 ??) | ||
39 | - SystemV FS 1024 (also 512 and 2048) | ||
40 | - Coherent FS 512 | ||
41 | |||
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. | ||
46 | |||
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! | ||
53 | |||
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! | ||
60 | |||
61 | * Inode on disk: "short", 0 means non-existent, the root dir ino is: | ||
62 | - Minix FS 1 | ||
63 | - Xenix FS, SystemV FS, Coherent FS 2 | ||
64 | |||
65 | * Maximum number of hard links to a file: | ||
66 | - Minix FS 250 | ||
67 | - Xenix FS ?? | ||
68 | - SystemV FS ?? | ||
69 | - Coherent FS >=10000 | ||
70 | |||
71 | * Free inode management: | ||
72 | - Minix FS a bitmap | ||
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. | ||
76 | |||
77 | * Free block management: | ||
78 | - Minix FS a bitmap | ||
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. | ||
87 | |||
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 | ||
93 | |||
94 | * Super-block layout: | ||
95 | - Minix FS | ||
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]; | ||
111 | char s_flock; | ||
112 | char s_ilock; | ||
113 | char s_modified; | ||
114 | char s_rdonly; | ||
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 | ||
121 | char s_fname[6]; | ||
122 | char s_fpack[6]; | ||
123 | then they differ considerably: | ||
124 | Xenix FS | ||
125 | char s_clean; | ||
126 | char s_fill[371]; | ||
127 | long s_magic; | ||
128 | long s_type; | ||
129 | SystemV FS | ||
130 | long s_fill[12 or 14]; | ||
131 | long s_state; | ||
132 | long s_magic; | ||
133 | long s_type; | ||
134 | Coherent FS | ||
135 | unsigned long s_unique; | ||
136 | Note that Coherent FS has no magic. | ||
137 | |||
138 | * Inode layout: | ||
139 | - Minix FS | ||
140 | unsigned short i_mode; | ||
141 | unsigned short i_uid; | ||
142 | unsigned long i_size; | ||
143 | unsigned long i_time; | ||
144 | unsigned char i_gid; | ||
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; | ||
157 | |||
158 | * Regular file data blocks are organized as | ||
159 | - Minix FS | ||
160 | 7 direct blocks | ||
161 | 1 indirect block (pointers to blocks) | ||
162 | 1 double-indirect block (pointer to pointers to blocks) | ||
163 | - Xenix FS, SystemV FS, Coherent FS | ||
164 | 10 direct blocks | ||
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) | ||
168 | |||
169 | * Inode size, inodes per block | ||
170 | - Minix FS 32 32 | ||
171 | - Xenix FS 64 16 | ||
172 | - SystemV FS 64 16 | ||
173 | - Coherent FS 64 8 | ||
174 | |||
175 | * Directory entry on disk | ||
176 | - Minix FS | ||
177 | unsigned short inode; | ||
178 | char name[14/30]; | ||
179 | - Xenix FS, SystemV FS, Coherent FS | ||
180 | unsigned short inode; | ||
181 | char name[14]; | ||
182 | |||
183 | * Dir entry size, dir entries per block | ||
184 | - Minix FS 16/32 64/32 | ||
185 | - Xenix FS 16 64 | ||
186 | - SystemV FS 16 64 | ||
187 | - Coherent FS 16 32 | ||
188 | |||
189 | * How to implement symbolic links such that the host fsck doesn't scream: | ||
190 | - Minix FS normal | ||
191 | - Xenix FS kludge: as regular files with chmod 1000 | ||
192 | - SystemV FS ?? | ||
193 | - Coherent FS kludge: as regular files with chmod 1000 | ||
35 | 194 | ||
36 | Bruno Haible | ||
37 | <haible@ma2s2.mathematik.uni-karlsruhe.de> | ||
38 | 195 | ||
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". | ||