aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdrian Bunk <bunk@stusta.de>2006-12-06 23:40:01 -0500
committerLinus Torvalds <torvalds@woody.osdl.org>2006-12-07 11:39:44 -0500
commit3982cd99c30285ebc71d405cd8530a3dfb7265de (patch)
tree288eb99e0c77acb7c58f1820d5579ce161e6a88e
parentf1a60dbf68061e5a5364cbc723786b355637ffd3 (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>
-rw-r--r--Documentation/filesystems/sysv-fs.txt177
-rw-r--r--fs/sysv/CHANGES60
-rw-r--r--fs/sysv/ChangeLog106
-rw-r--r--fs/sysv/INTRO182
4 files changed, 168 insertions, 357 deletions
diff --git a/Documentation/filesystems/sysv-fs.txt b/Documentation/filesystems/sysv-fs.txt
index d81722418010..253b50d1328e 100644
--- a/Documentation/filesystems/sysv-fs.txt
+++ b/Documentation/filesystems/sysv-fs.txt
@@ -1,11 +1,8 @@
1This is the implementation of the SystemV/Coherent filesystem for Linux.
2It implements all of 1It 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
7This is version beta 4.
8
9To install: 6To 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
31Please report any bugs and suggestions to 28These 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
36Bruno Haible
37<haible@ma2s2.mathematik.uni-karlsruhe.de>
38 195
196Notation: We often speak of a "block" but mean a zone (the allocation unit)
197and not the disk driver's notion of "block".
diff --git a/fs/sysv/CHANGES b/fs/sysv/CHANGES
deleted file mode 100644
index 66ea6e92be66..000000000000
--- a/fs/sysv/CHANGES
+++ /dev/null
@@ -1,60 +0,0 @@
1Mon, 15 Dec 1997 Krzysztof G. Baranowski <kgb@manjak.knm.org.pl>
2 * namei.c: struct sysv_dir_inode_operations updated to use dentries.
3
4Fri, 23 Jan 1998 Krzysztof G. Baranowski <kgb@manjak.knm.org.pl>
5 * inode.c: corrected 1 track offset setting (in sb->sv_block_base).
6 Originally it was overridden (by setting to zero)
7 in detected_[xenix,sysv4,sysv2,coherent]. Thanks
8 to Andrzej Krzysztofowicz <ankry@mif.pg.gda.pl>
9 for identifying the problem.
10
11Tue, 27 Jan 1998 Krzysztof G. Baranowski <kgb@manjak.knm.org.pl>
12 * inode.c: added 2048-byte block support to SystemV FS.
13 Merged detected_bs[512,1024,2048]() into one function:
14 void detected_bs (u_char type, struct super_block *sb).
15 Thanks to Andrzej Krzysztofowicz <ankry@mif.pg.gda.pl>
16 for the patch.
17
18Wed, 4 Feb 1998 Krzysztof G. Baranowski <kgb@manjak.knm.org.pl>
19 * namei.c: removed static subdir(); is_subdir() from dcache.c
20 is used instead. Cosmetic changes.
21
22Thu, 3 Dec 1998 Al Viro (viro@parcelfarce.linux.theplanet.co.uk)
23 * namei.c (sysv_rmdir):
24 Bugectomy: old check for victim being busy
25 (inode->i_count) wasn't replaced (with checking
26 dentry->d_count) and escaped Linus in the last round
27 of changes. Shot and buried.
28
29Wed, 9 Dec 1998 AV
30 * namei.c (do_sysv_rename):
31 Fixed incorrect check for other owners + race.
32 Removed checks that went to VFS.
33 * namei.c (sysv_unlink):
34 Removed checks that went to VFS.
35
36Thu, 10 Dec 1998 AV
37 * namei.c (do_mknod):
38 Removed dead code - mknod is never asked to
39 create a symlink or directory. Incidentially,
40 it wouldn't do it right if it would be called.
41
42Sat, 26 Dec 1998 KGB
43 * inode.c (detect_sysv4):
44 Added detection of expanded s_type field (0x10,
45 0x20 and 0x30). Forced read-only access in this case.
46
47Sun, 21 Mar 1999 AV
48 * namei.c (sysv_link):
49 Fixed i_count usage that resulted in dcache corruption.
50 * inode.c:
51 Filled ->delete_inode() method with sysv_delete_inode().
52 sysv_put_inode() is gone, as it tried to do ->delete_
53 _inode()'s job.
54 * ialloc.c: (sysv_free_inode):
55 Fixed race.
56
57Sun, 30 Apr 1999 AV
58 * namei.c (sysv_mknod):
59 Removed dead code (S_IFREG case is now passed to
60 ->create() by VFS).
diff --git a/fs/sysv/ChangeLog b/fs/sysv/ChangeLog
deleted file mode 100644
index f403f8b91b80..000000000000
--- a/fs/sysv/ChangeLog
+++ /dev/null
@@ -1,106 +0,0 @@
1Thu Feb 14 2002 Andrew Morton <akpm@zip.com.au>
2
3 * dir_commit_chunk(): call writeout_one_page() as well as
4 waitfor_one_page() for IS_SYNC directories, so that we
5 actually do sync the directory. (forward-port from 2.4).
6
7Thu Feb 7 2002 Alexander Viro <viro@parcelfarce.linux.theplanet.co.uk>
8
9 * super.c: switched to ->get_sb()
10 * ChangeLog: fixed dates ;-)
11
122002-01-24 David S. Miller <davem@redhat.com>
13
14 * inode.c: Include linux/init.h
15
16Mon Jan 21 2002 Alexander Viro <viro@parcelfarce.linux.theplanet.co.uk>
17 * ialloc.c (sysv_new_inode): zero SYSV_I(inode)->i_data out.
18 * i_vnode renamed to vfs_inode. Sorry, but let's keep that
19 consistent.
20
21Sat Jan 19 2002 Christoph Hellwig <hch@infradead.org>
22
23 * include/linux/sysv_fs.h (SYSV_I): Get fs-private inode data using
24 list_entry() instead of inode->u.
25 * include/linux/sysv_fs_i.h: Add 'struct inode i_vnode' field to
26 sysv_inode_info structure.
27 * inode.c: Include <linux/slab.h>, implement alloc_inode/destroy_inode
28 sop methods, add infrastructure for per-fs inode slab cache.
29 * super.c (init_sysv_fs): Initialize inode cache, recover properly
30 in the case of failed register_filesystem for V7.
31 (exit_sysv_fs): Destroy inode cache.
32
33Sat Jan 19 2002 Christoph Hellwig <hch@infradead.org>
34
35 * include/linux/sysv_fs.h: Include <linux/sysv_fs_i.h>, declare SYSV_I().
36 * dir.c (sysv_find_entry): Use SYSV_I() instead of ->u.sysv_i to
37 access fs-private inode data.
38 * ialloc.c (sysv_new_inode): Likewise.
39 * inode.c (sysv_read_inode): Likewise.
40 (sysv_update_inode): Likewise.
41 * itree.c (get_branch): Likewise.
42 (sysv_truncate): Likewise.
43 * symlink.c (sysv_readlink): Likewise.
44 (sysv_follow_link): Likewise.
45
46Fri Jan 4 2002 Alexander Viro <viro@parcelfarce.linux.theplanet.co.uk>
47
48 * ialloc.c (sysv_free_inode): Use sb->s_id instead of bdevname().
49 * inode.c (sysv_read_inode): Likewise.
50 (sysv_update_inode): Likewise.
51 (sysv_sync_inode): Likewise.
52 * super.c (detect_sysv): Likewise.
53 (complete_read_super): Likewise.
54 (sysv_read_super): Likewise.
55 (v7_read_super): Likewise.
56
57Sun Dec 30 2001 Manfred Spraul <manfred@colorfullife.com>
58
59 * dir.c (dir_commit_chunk): Do not set dir->i_version.
60 (sysv_readdir): Likewise.
61
62Thu Dec 27 2001 Alexander Viro <viro@parcelfarce.linux.theplanet.co.uk>
63
64 * itree.c (get_block): Use map_bh() to fill out bh_result.
65
66Tue Dec 25 2001 Alexander Viro <viro@parcelfarce.linux.theplanet.co.uk>
67
68 * super.c (sysv_read_super): Use sb_set_blocksize() to set blocksize.
69 (v7_read_super): Likewise.
70
71Tue Nov 27 2001 Alexander Viro <viro@parcelfarce.linux.theplanet.co.uk>
72
73 * itree.c (get_block): Change type for iblock argument to sector_t.
74 * super.c (sysv_read_super): Set s_blocksize early.
75 (v7_read_super): Likewise.
76 * balloc.c (sysv_new_block): Use sb_bread(). instead of bread().
77 (sysv_count_free_blocks): Likewise.
78 * ialloc.c (sysv_raw_inode): Likewise.
79 * itree.c (get_branch): Likewise.
80 (free_branches): Likewise.
81 * super.c (sysv_read_super): Likewise.
82 (v7_read_super): Likewise.
83
84Sat Dec 15 2001 Christoph Hellwig <hch@infradead.org>
85
86 * inode.c (sysv_read_inode): Mark inode as bad in case of failure.
87 * super.c (complete_read_super): Check for bad root inode.
88
89Wed Nov 21 2001 Andrew Morton <andrewm@uow.edu.au>
90
91 * file.c (sysv_sync_file): Call fsync_inode_data_buffers.
92
93Fri Oct 26 2001 Christoph Hellwig <hch@infradead.org>
94
95 * dir.c, ialloc.c, namei.c, include/linux/sysv_fs_i.h:
96 Implement per-Inode lookup offset cache.
97 Modelled after Ted's ext2 patch.
98
99Fri Oct 26 2001 Christoph Hellwig <hch@infradead.org>
100
101 * inode.c, super.c, include/linux/sysv_fs.h,
102 include/linux/sysv_fs_sb.h:
103 Remove symlink faking. Noone really wants to use these as
104 linux filesystems and native OSes don't support it anyway.
105
106
diff --git a/fs/sysv/INTRO b/fs/sysv/INTRO
deleted file mode 100644
index de4e4d17cac6..000000000000
--- a/fs/sysv/INTRO
+++ /dev/null
@@ -1,182 +0,0 @@
1This is the implementation of the SystemV/Coherent filesystem for Linux.
2It grew out of separate filesystem implementations
3
4 Xenix FS Doug Evans <dje@cygnus.com> June 1992
5 SystemV FS Paul B. Monday <pmonday@eecs.wsu.edu> March-June 1993
6 Coherent FS B. Haible <haible@ma2s2.mathematik.uni-karlsruhe.de> June 1993
7
8and was merged together in July 1993.
9
10These filesystems are rather similar. Here is a comparison with Minix FS:
11
12* Linux fdisk reports on partitions
13 - Minix FS 0x81 Linux/Minix
14 - Xenix FS ??
15 - SystemV FS ??
16 - Coherent FS 0x08 AIX bootable
17
18* Size of a block or zone (data allocation unit on disk)
19 - Minix FS 1024
20 - Xenix FS 1024 (also 512 ??)
21 - SystemV FS 1024 (also 512 and 2048)
22 - Coherent FS 512
23
24* General layout: all have one boot block, one super block and
25 separate areas for inodes and for directories/data.
26 On SystemV Release 2 FS (e.g. Microport) the first track is reserved and
27 all the block numbers (including the super block) are offset by one track.
28
29* Byte ordering of "short" (16 bit entities) on disk:
30 - Minix FS little endian 0 1
31 - Xenix FS little endian 0 1
32 - SystemV FS little endian 0 1
33 - Coherent FS little endian 0 1
34 Of course, this affects only the file system, not the data of files on it!
35
36* Byte ordering of "long" (32 bit entities) on disk:
37 - Minix FS little endian 0 1 2 3
38 - Xenix FS little endian 0 1 2 3
39 - SystemV FS little endian 0 1 2 3
40 - Coherent FS PDP-11 2 3 0 1
41 Of course, this affects only the file system, not the data of files on it!
42
43* Inode on disk: "short", 0 means non-existent, the root dir ino is:
44 - Minix FS 1
45 - Xenix FS, SystemV FS, Coherent FS 2
46
47* Maximum number of hard links to a file:
48 - Minix FS 250
49 - Xenix FS ??
50 - SystemV FS ??
51 - Coherent FS >=10000
52
53* Free inode management:
54 - Minix FS a bitmap
55 - Xenix FS, SystemV FS, Coherent FS
56 There is a cache of a certain number of free inodes in the super-block.
57 When it is exhausted, new free inodes are found using a linear search.
58
59* Free block management:
60 - Minix FS a bitmap
61 - Xenix FS, SystemV FS, Coherent FS
62 Free blocks are organized in a "free list". Maybe a misleading term,
63 since it is not true that every free block contains a pointer to
64 the next free block. Rather, the free blocks are organized in chunks
65 of limited size, and every now and then a free block contains pointers
66 to the free blocks pertaining to the next chunk; the first of these
67 contains pointers and so on. The list terminates with a "block number"
68 0 on Xenix FS and SystemV FS, with a block zeroed out on Coherent FS.
69
70* Super-block location:
71 - Minix FS block 1 = bytes 1024..2047
72 - Xenix FS block 1 = bytes 1024..2047
73 - SystemV FS bytes 512..1023
74 - Coherent FS block 1 = bytes 512..1023
75
76* Super-block layout:
77 - Minix FS
78 unsigned short s_ninodes;
79 unsigned short s_nzones;
80 unsigned short s_imap_blocks;
81 unsigned short s_zmap_blocks;
82 unsigned short s_firstdatazone;
83 unsigned short s_log_zone_size;
84 unsigned long s_max_size;
85 unsigned short s_magic;
86 - Xenix FS, SystemV FS, Coherent FS
87 unsigned short s_firstdatazone;
88 unsigned long s_nzones;
89 unsigned short s_fzone_count;
90 unsigned long s_fzones[NICFREE];
91 unsigned short s_finode_count;
92 unsigned short s_finodes[NICINOD];
93 char s_flock;
94 char s_ilock;
95 char s_modified;
96 char s_rdonly;
97 unsigned long s_time;
98 short s_dinfo[4]; -- SystemV FS only
99 unsigned long s_free_zones;
100 unsigned short s_free_inodes;
101 short s_dinfo[4]; -- Xenix FS only
102 unsigned short s_interleave_m,s_interleave_n; -- Coherent FS only
103 char s_fname[6];
104 char s_fpack[6];
105 then they differ considerably:
106 Xenix FS
107 char s_clean;
108 char s_fill[371];
109 long s_magic;
110 long s_type;
111 SystemV FS
112 long s_fill[12 or 14];
113 long s_state;
114 long s_magic;
115 long s_type;
116 Coherent FS
117 unsigned long s_unique;
118 Note that Coherent FS has no magic.
119
120* Inode layout:
121 - Minix FS
122 unsigned short i_mode;
123 unsigned short i_uid;
124 unsigned long i_size;
125 unsigned long i_time;
126 unsigned char i_gid;
127 unsigned char i_nlinks;
128 unsigned short i_zone[7+1+1];
129 - Xenix FS, SystemV FS, Coherent FS
130 unsigned short i_mode;
131 unsigned short i_nlink;
132 unsigned short i_uid;
133 unsigned short i_gid;
134 unsigned long i_size;
135 unsigned char i_zone[3*(10+1+1+1)];
136 unsigned long i_atime;
137 unsigned long i_mtime;
138 unsigned long i_ctime;
139
140* Regular file data blocks are organized as
141 - Minix FS
142 7 direct blocks
143 1 indirect block (pointers to blocks)
144 1 double-indirect block (pointer to pointers to blocks)
145 - Xenix FS, SystemV FS, Coherent FS
146 10 direct blocks
147 1 indirect block (pointers to blocks)
148 1 double-indirect block (pointer to pointers to blocks)
149 1 triple-indirect block (pointer to pointers to pointers to blocks)
150
151* Inode size, inodes per block
152 - Minix FS 32 32
153 - Xenix FS 64 16
154 - SystemV FS 64 16
155 - Coherent FS 64 8
156
157* Directory entry on disk
158 - Minix FS
159 unsigned short inode;
160 char name[14/30];
161 - Xenix FS, SystemV FS, Coherent FS
162 unsigned short inode;
163 char name[14];
164
165* Dir entry size, dir entries per block
166 - Minix FS 16/32 64/32
167 - Xenix FS 16 64
168 - SystemV FS 16 64
169 - Coherent FS 16 32
170
171* How to implement symbolic links such that the host fsck doesn't scream:
172 - Minix FS normal
173 - Xenix FS kludge: as regular files with chmod 1000
174 - SystemV FS ??
175 - Coherent FS kludge: as regular files with chmod 1000
176
177
178Notation: We often speak of a "block" but mean a zone (the allocation unit)
179and not the disk driver's notion of "block".
180
181
182Bruno Haible <haible@ma2s2.mathematik.uni-karlsruhe.de>