http://downloads.netgear.com/files/GPL/GPL_Source_V361j_DM111PSP_series_consumer_rele...
[bcm963xx.git] / kernel / linux / Documentation / filesystems / ext3.txt
1
2 Ext3 Filesystem
3 ===============
4
5 ext3 was originally released in September 1999. Written by Stephen Tweedie
6 for 2.2 branch, and ported to 2.4 kernels by Peter Braam, Andreas Dilger, 
7 Andrew Morton, Alexander Viro, Ted Ts'o and Stephen Tweedie.
8
9 ext3 is ext2 filesystem enhanced with journalling capabilities. 
10
11 Options
12 =======
13
14 When mounting an ext3 filesystem, the following option are accepted:
15 (*) == default
16
17 jounal=update           Update the ext3 file system's journal to the 
18                         current format.
19
20 journal=inum            When a journal already exists, this option is 
21                         ignored. Otherwise, it specifies the number of
22                         the inode which will represent the ext3 file
23                         system's journal file.
24
25 bsddf           (*)     Make 'df' act like BSD.
26 minixdf                 Make 'df' act like Minix.
27
28 check=none              Don't do extra checking of bitmaps on mount.
29 nocheck         
30
31 debug                   Extra debugging information is sent to syslog.
32
33 noload                  Don't load the journal on mounting.
34
35 errors=remount-ro(*)    Remount the filesystem read-only on an error.
36 errors=continue         Keep going on a filesystem error.
37 errors=panic            Panic and halt the machine if an error occurs.
38
39 grpid                   Give objects the same group ID as their creator.
40 bsdgroups               
41
42 nogrpid         (*)     New objects have the group ID of their creator.
43 sysvgroups
44
45 resgid=n                The group ID which may use the reserved blocks.
46
47 resuid=n                The user ID which may use the reserved blocks.
48
49 sb=n                    Use alternate superblock at this location.
50
51 data=journal            All data are committed into the journal prior 
52                         to being written into the main file system.
53                 
54 data=ordered    (*)     All data are forced directly out to the main file 
55                         system prior to its metadata being committed to 
56                         the journal.
57                 
58 data=writeback          Data ordering is not preserved, data may be 
59                         written into the main file system after its
60                         metadata has been committed to the journal.
61
62 quota                   Quota options are currently silently ignored.
63 noquota                 (see fs/ext3/super.c, line 594)
64 grpquota
65 usrquota
66
67
68 Specification
69 =============
70 ext3 shares all disk implementation with ext2 filesystem, and add
71 transactions capabilities to ext2.  Journaling is done by the
72 Journaling block device layer.
73
74 Journaling Block Device layer
75 -----------------------------
76 The Journaling Block Device layer (JBD) isn't ext3 specific.  It was
77 design to add journaling capabilities on a block device.  The ext3
78 filesystem code will inform the JBD of modifications it is performing
79 (Call a transaction).  the journal support the transactions start and
80 stop, and in case of crash, the journal can replayed the transactions
81 to put the partition on a consistent state fastly.
82
83 handles represent a single atomic update to a filesystem.  JBD can
84 handle external journal on a block device.
85
86 Data Mode
87 ---------
88 There's 3 different data modes:
89
90 * writeback mode
91 In data=writeback mode, ext3 does not journal data at all.  This mode
92 provides a similar level of journaling as XFS, JFS, and ReiserFS in its
93 default mode - metadata journaling.  A crash+recovery can cause
94 incorrect data to appear in files which were written shortly before the
95 crash.  This mode will typically provide the best ext3 performance.
96
97 * ordered mode
98 In data=ordered mode, ext3 only officially journals metadata, but it
99 logically groups metadata and data blocks into a single unit called a
100 transaction.  When it's time to write the new metadata out to disk, the
101 associated data blocks are written first.  In general, this mode
102 perform slightly slower than writeback but significantly faster than
103 journal mode.
104
105 * journal mode
106 data=journal mode provides full data and metadata journaling.  All new
107 data is written to the journal first, and then to its final location. 
108 In the event of a crash, the journal can be replayed, bringing both
109 data and metadata into a consistent state.  This mode is the slowest
110 except when data needs to be read from and written to disk at the same
111 time where it outperform all others mode.
112
113 Compatibility
114 -------------
115
116 Ext2 partitions can be easily convert to ext3, with `tune2fs -j <dev>`.
117  Ext3 is fully compatible with Ext2.  Ext3 partitions can easily be
118 mounted as Ext2.
119
120 External Tools
121 ==============
122 see manual pages to know more.
123
124 tune2fs:        create a ext3 journal on a ext2 partition with the -j flags
125 mke2fs:         create a ext3 partition with the -j flags
126 debugfs:        ext2 and ext3 file system debugger
127
128 References
129 ==========
130
131 kernel source:  file:/usr/src/linux/fs/ext3
132                 file:/usr/src/linux/fs/jbd
133
134 programs:       http://e2fsprogs.sourceforge.net
135
136 useful link:
137                 http://www.zip.com.au/~akpm/linux/ext3/ext3-usage.html
138                 http://www-106.ibm.com/developerworks/linux/library/l-fs7/
139                 http://www-106.ibm.com/developerworks/linux/library/l-fs8/