xref: /OK3568_Linux_fs/kernel/Documentation/filesystems/ext4/super.rst (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun.. SPDX-License-Identifier: GPL-2.0
2*4882a593Smuzhiyun
3*4882a593SmuzhiyunSuper Block
4*4882a593Smuzhiyun-----------
5*4882a593Smuzhiyun
6*4882a593SmuzhiyunThe superblock records various information about the enclosing
7*4882a593Smuzhiyunfilesystem, such as block counts, inode counts, supported features,
8*4882a593Smuzhiyunmaintenance information, and more.
9*4882a593Smuzhiyun
10*4882a593SmuzhiyunIf the sparse\_super feature flag is set, redundant copies of the
11*4882a593Smuzhiyunsuperblock and group descriptors are kept only in the groups whose group
12*4882a593Smuzhiyunnumber is either 0 or a power of 3, 5, or 7. If the flag is not set,
13*4882a593Smuzhiyunredundant copies are kept in all groups.
14*4882a593Smuzhiyun
15*4882a593SmuzhiyunThe superblock checksum is calculated against the superblock structure,
16*4882a593Smuzhiyunwhich includes the FS UUID.
17*4882a593Smuzhiyun
18*4882a593SmuzhiyunThe ext4 superblock is laid out as follows in
19*4882a593Smuzhiyun``struct ext4_super_block``:
20*4882a593Smuzhiyun
21*4882a593Smuzhiyun.. list-table::
22*4882a593Smuzhiyun   :widths: 8 8 24 40
23*4882a593Smuzhiyun   :header-rows: 1
24*4882a593Smuzhiyun
25*4882a593Smuzhiyun   * - Offset
26*4882a593Smuzhiyun     - Size
27*4882a593Smuzhiyun     - Name
28*4882a593Smuzhiyun     - Description
29*4882a593Smuzhiyun   * - 0x0
30*4882a593Smuzhiyun     - \_\_le32
31*4882a593Smuzhiyun     - s\_inodes\_count
32*4882a593Smuzhiyun     - Total inode count.
33*4882a593Smuzhiyun   * - 0x4
34*4882a593Smuzhiyun     - \_\_le32
35*4882a593Smuzhiyun     - s\_blocks\_count\_lo
36*4882a593Smuzhiyun     - Total block count.
37*4882a593Smuzhiyun   * - 0x8
38*4882a593Smuzhiyun     - \_\_le32
39*4882a593Smuzhiyun     - s\_r\_blocks\_count\_lo
40*4882a593Smuzhiyun     - This number of blocks can only be allocated by the super-user.
41*4882a593Smuzhiyun   * - 0xC
42*4882a593Smuzhiyun     - \_\_le32
43*4882a593Smuzhiyun     - s\_free\_blocks\_count\_lo
44*4882a593Smuzhiyun     - Free block count.
45*4882a593Smuzhiyun   * - 0x10
46*4882a593Smuzhiyun     - \_\_le32
47*4882a593Smuzhiyun     - s\_free\_inodes\_count
48*4882a593Smuzhiyun     - Free inode count.
49*4882a593Smuzhiyun   * - 0x14
50*4882a593Smuzhiyun     - \_\_le32
51*4882a593Smuzhiyun     - s\_first\_data\_block
52*4882a593Smuzhiyun     - First data block. This must be at least 1 for 1k-block filesystems and
53*4882a593Smuzhiyun       is typically 0 for all other block sizes.
54*4882a593Smuzhiyun   * - 0x18
55*4882a593Smuzhiyun     - \_\_le32
56*4882a593Smuzhiyun     - s\_log\_block\_size
57*4882a593Smuzhiyun     - Block size is 2 ^ (10 + s\_log\_block\_size).
58*4882a593Smuzhiyun   * - 0x1C
59*4882a593Smuzhiyun     - \_\_le32
60*4882a593Smuzhiyun     - s\_log\_cluster\_size
61*4882a593Smuzhiyun     - Cluster size is 2 ^ (10 + s\_log\_cluster\_size) blocks if bigalloc is
62*4882a593Smuzhiyun       enabled. Otherwise s\_log\_cluster\_size must equal s\_log\_block\_size.
63*4882a593Smuzhiyun   * - 0x20
64*4882a593Smuzhiyun     - \_\_le32
65*4882a593Smuzhiyun     - s\_blocks\_per\_group
66*4882a593Smuzhiyun     - Blocks per group.
67*4882a593Smuzhiyun   * - 0x24
68*4882a593Smuzhiyun     - \_\_le32
69*4882a593Smuzhiyun     - s\_clusters\_per\_group
70*4882a593Smuzhiyun     - Clusters per group, if bigalloc is enabled. Otherwise
71*4882a593Smuzhiyun       s\_clusters\_per\_group must equal s\_blocks\_per\_group.
72*4882a593Smuzhiyun   * - 0x28
73*4882a593Smuzhiyun     - \_\_le32
74*4882a593Smuzhiyun     - s\_inodes\_per\_group
75*4882a593Smuzhiyun     - Inodes per group.
76*4882a593Smuzhiyun   * - 0x2C
77*4882a593Smuzhiyun     - \_\_le32
78*4882a593Smuzhiyun     - s\_mtime
79*4882a593Smuzhiyun     - Mount time, in seconds since the epoch.
80*4882a593Smuzhiyun   * - 0x30
81*4882a593Smuzhiyun     - \_\_le32
82*4882a593Smuzhiyun     - s\_wtime
83*4882a593Smuzhiyun     - Write time, in seconds since the epoch.
84*4882a593Smuzhiyun   * - 0x34
85*4882a593Smuzhiyun     - \_\_le16
86*4882a593Smuzhiyun     - s\_mnt\_count
87*4882a593Smuzhiyun     - Number of mounts since the last fsck.
88*4882a593Smuzhiyun   * - 0x36
89*4882a593Smuzhiyun     - \_\_le16
90*4882a593Smuzhiyun     - s\_max\_mnt\_count
91*4882a593Smuzhiyun     - Number of mounts beyond which a fsck is needed.
92*4882a593Smuzhiyun   * - 0x38
93*4882a593Smuzhiyun     - \_\_le16
94*4882a593Smuzhiyun     - s\_magic
95*4882a593Smuzhiyun     - Magic signature, 0xEF53
96*4882a593Smuzhiyun   * - 0x3A
97*4882a593Smuzhiyun     - \_\_le16
98*4882a593Smuzhiyun     - s\_state
99*4882a593Smuzhiyun     - File system state. See super_state_ for more info.
100*4882a593Smuzhiyun   * - 0x3C
101*4882a593Smuzhiyun     - \_\_le16
102*4882a593Smuzhiyun     - s\_errors
103*4882a593Smuzhiyun     - Behaviour when detecting errors. See super_errors_ for more info.
104*4882a593Smuzhiyun   * - 0x3E
105*4882a593Smuzhiyun     - \_\_le16
106*4882a593Smuzhiyun     - s\_minor\_rev\_level
107*4882a593Smuzhiyun     - Minor revision level.
108*4882a593Smuzhiyun   * - 0x40
109*4882a593Smuzhiyun     - \_\_le32
110*4882a593Smuzhiyun     - s\_lastcheck
111*4882a593Smuzhiyun     - Time of last check, in seconds since the epoch.
112*4882a593Smuzhiyun   * - 0x44
113*4882a593Smuzhiyun     - \_\_le32
114*4882a593Smuzhiyun     - s\_checkinterval
115*4882a593Smuzhiyun     - Maximum time between checks, in seconds.
116*4882a593Smuzhiyun   * - 0x48
117*4882a593Smuzhiyun     - \_\_le32
118*4882a593Smuzhiyun     - s\_creator\_os
119*4882a593Smuzhiyun     - Creator OS. See the table super_creator_ for more info.
120*4882a593Smuzhiyun   * - 0x4C
121*4882a593Smuzhiyun     - \_\_le32
122*4882a593Smuzhiyun     - s\_rev\_level
123*4882a593Smuzhiyun     - Revision level. See the table super_revision_ for more info.
124*4882a593Smuzhiyun   * - 0x50
125*4882a593Smuzhiyun     - \_\_le16
126*4882a593Smuzhiyun     - s\_def\_resuid
127*4882a593Smuzhiyun     - Default uid for reserved blocks.
128*4882a593Smuzhiyun   * - 0x52
129*4882a593Smuzhiyun     - \_\_le16
130*4882a593Smuzhiyun     - s\_def\_resgid
131*4882a593Smuzhiyun     - Default gid for reserved blocks.
132*4882a593Smuzhiyun   * -
133*4882a593Smuzhiyun     -
134*4882a593Smuzhiyun     -
135*4882a593Smuzhiyun     - These fields are for EXT4_DYNAMIC_REV superblocks only.
136*4882a593Smuzhiyun
137*4882a593Smuzhiyun       Note: the difference between the compatible feature set and the
138*4882a593Smuzhiyun       incompatible feature set is that if there is a bit set in the
139*4882a593Smuzhiyun       incompatible feature set that the kernel doesn't know about, it should
140*4882a593Smuzhiyun       refuse to mount the filesystem.
141*4882a593Smuzhiyun
142*4882a593Smuzhiyun       e2fsck's requirements are more strict; if it doesn't know
143*4882a593Smuzhiyun       about a feature in either the compatible or incompatible feature set, it
144*4882a593Smuzhiyun       must abort and not try to meddle with things it doesn't understand...
145*4882a593Smuzhiyun   * - 0x54
146*4882a593Smuzhiyun     - \_\_le32
147*4882a593Smuzhiyun     - s\_first\_ino
148*4882a593Smuzhiyun     - First non-reserved inode.
149*4882a593Smuzhiyun   * - 0x58
150*4882a593Smuzhiyun     - \_\_le16
151*4882a593Smuzhiyun     - s\_inode\_size
152*4882a593Smuzhiyun     - Size of inode structure, in bytes.
153*4882a593Smuzhiyun   * - 0x5A
154*4882a593Smuzhiyun     - \_\_le16
155*4882a593Smuzhiyun     - s\_block\_group\_nr
156*4882a593Smuzhiyun     - Block group # of this superblock.
157*4882a593Smuzhiyun   * - 0x5C
158*4882a593Smuzhiyun     - \_\_le32
159*4882a593Smuzhiyun     - s\_feature\_compat
160*4882a593Smuzhiyun     - Compatible feature set flags. Kernel can still read/write this fs even
161*4882a593Smuzhiyun       if it doesn't understand a flag; fsck should not do that. See the
162*4882a593Smuzhiyun       super_compat_ table for more info.
163*4882a593Smuzhiyun   * - 0x60
164*4882a593Smuzhiyun     - \_\_le32
165*4882a593Smuzhiyun     - s\_feature\_incompat
166*4882a593Smuzhiyun     - Incompatible feature set. If the kernel or fsck doesn't understand one
167*4882a593Smuzhiyun       of these bits, it should stop. See the super_incompat_ table for more
168*4882a593Smuzhiyun       info.
169*4882a593Smuzhiyun   * - 0x64
170*4882a593Smuzhiyun     - \_\_le32
171*4882a593Smuzhiyun     - s\_feature\_ro\_compat
172*4882a593Smuzhiyun     - Readonly-compatible feature set. If the kernel doesn't understand one of
173*4882a593Smuzhiyun       these bits, it can still mount read-only. See the super_rocompat_ table
174*4882a593Smuzhiyun       for more info.
175*4882a593Smuzhiyun   * - 0x68
176*4882a593Smuzhiyun     - \_\_u8
177*4882a593Smuzhiyun     - s\_uuid[16]
178*4882a593Smuzhiyun     - 128-bit UUID for volume.
179*4882a593Smuzhiyun   * - 0x78
180*4882a593Smuzhiyun     - char
181*4882a593Smuzhiyun     - s\_volume\_name[16]
182*4882a593Smuzhiyun     - Volume label.
183*4882a593Smuzhiyun   * - 0x88
184*4882a593Smuzhiyun     - char
185*4882a593Smuzhiyun     - s\_last\_mounted[64]
186*4882a593Smuzhiyun     - Directory where filesystem was last mounted.
187*4882a593Smuzhiyun   * - 0xC8
188*4882a593Smuzhiyun     - \_\_le32
189*4882a593Smuzhiyun     - s\_algorithm\_usage\_bitmap
190*4882a593Smuzhiyun     - For compression (Not used in e2fsprogs/Linux)
191*4882a593Smuzhiyun   * -
192*4882a593Smuzhiyun     -
193*4882a593Smuzhiyun     -
194*4882a593Smuzhiyun     - Performance hints.  Directory preallocation should only happen if the
195*4882a593Smuzhiyun       EXT4_FEATURE_COMPAT_DIR_PREALLOC flag is on.
196*4882a593Smuzhiyun   * - 0xCC
197*4882a593Smuzhiyun     - \_\_u8
198*4882a593Smuzhiyun     - s\_prealloc\_blocks
199*4882a593Smuzhiyun     - #. of blocks to try to preallocate for ... files? (Not used in
200*4882a593Smuzhiyun       e2fsprogs/Linux)
201*4882a593Smuzhiyun   * - 0xCD
202*4882a593Smuzhiyun     - \_\_u8
203*4882a593Smuzhiyun     - s\_prealloc\_dir\_blocks
204*4882a593Smuzhiyun     - #. of blocks to preallocate for directories. (Not used in
205*4882a593Smuzhiyun       e2fsprogs/Linux)
206*4882a593Smuzhiyun   * - 0xCE
207*4882a593Smuzhiyun     - \_\_le16
208*4882a593Smuzhiyun     - s\_reserved\_gdt\_blocks
209*4882a593Smuzhiyun     - Number of reserved GDT entries for future filesystem expansion.
210*4882a593Smuzhiyun   * -
211*4882a593Smuzhiyun     -
212*4882a593Smuzhiyun     -
213*4882a593Smuzhiyun     - Journalling support is valid only if EXT4_FEATURE_COMPAT_HAS_JOURNAL is
214*4882a593Smuzhiyun       set.
215*4882a593Smuzhiyun   * - 0xD0
216*4882a593Smuzhiyun     - \_\_u8
217*4882a593Smuzhiyun     - s\_journal\_uuid[16]
218*4882a593Smuzhiyun     - UUID of journal superblock
219*4882a593Smuzhiyun   * - 0xE0
220*4882a593Smuzhiyun     - \_\_le32
221*4882a593Smuzhiyun     - s\_journal\_inum
222*4882a593Smuzhiyun     - inode number of journal file.
223*4882a593Smuzhiyun   * - 0xE4
224*4882a593Smuzhiyun     - \_\_le32
225*4882a593Smuzhiyun     - s\_journal\_dev
226*4882a593Smuzhiyun     - Device number of journal file, if the external journal feature flag is
227*4882a593Smuzhiyun       set.
228*4882a593Smuzhiyun   * - 0xE8
229*4882a593Smuzhiyun     - \_\_le32
230*4882a593Smuzhiyun     - s\_last\_orphan
231*4882a593Smuzhiyun     - Start of list of orphaned inodes to delete.
232*4882a593Smuzhiyun   * - 0xEC
233*4882a593Smuzhiyun     - \_\_le32
234*4882a593Smuzhiyun     - s\_hash\_seed[4]
235*4882a593Smuzhiyun     - HTREE hash seed.
236*4882a593Smuzhiyun   * - 0xFC
237*4882a593Smuzhiyun     - \_\_u8
238*4882a593Smuzhiyun     - s\_def\_hash\_version
239*4882a593Smuzhiyun     - Default hash algorithm to use for directory hashes. See super_def_hash_
240*4882a593Smuzhiyun       for more info.
241*4882a593Smuzhiyun   * - 0xFD
242*4882a593Smuzhiyun     - \_\_u8
243*4882a593Smuzhiyun     - s\_jnl\_backup\_type
244*4882a593Smuzhiyun     - If this value is 0 or EXT3\_JNL\_BACKUP\_BLOCKS (1), then the
245*4882a593Smuzhiyun       ``s_jnl_blocks`` field contains a duplicate copy of the inode's
246*4882a593Smuzhiyun       ``i_block[]`` array and ``i_size``.
247*4882a593Smuzhiyun   * - 0xFE
248*4882a593Smuzhiyun     - \_\_le16
249*4882a593Smuzhiyun     - s\_desc\_size
250*4882a593Smuzhiyun     - Size of group descriptors, in bytes, if the 64bit incompat feature flag
251*4882a593Smuzhiyun       is set.
252*4882a593Smuzhiyun   * - 0x100
253*4882a593Smuzhiyun     - \_\_le32
254*4882a593Smuzhiyun     - s\_default\_mount\_opts
255*4882a593Smuzhiyun     - Default mount options. See the super_mountopts_ table for more info.
256*4882a593Smuzhiyun   * - 0x104
257*4882a593Smuzhiyun     - \_\_le32
258*4882a593Smuzhiyun     - s\_first\_meta\_bg
259*4882a593Smuzhiyun     - First metablock block group, if the meta\_bg feature is enabled.
260*4882a593Smuzhiyun   * - 0x108
261*4882a593Smuzhiyun     - \_\_le32
262*4882a593Smuzhiyun     - s\_mkfs\_time
263*4882a593Smuzhiyun     - When the filesystem was created, in seconds since the epoch.
264*4882a593Smuzhiyun   * - 0x10C
265*4882a593Smuzhiyun     - \_\_le32
266*4882a593Smuzhiyun     - s\_jnl\_blocks[17]
267*4882a593Smuzhiyun     - Backup copy of the journal inode's ``i_block[]`` array in the first 15
268*4882a593Smuzhiyun       elements and i\_size\_high and i\_size in the 16th and 17th elements,
269*4882a593Smuzhiyun       respectively.
270*4882a593Smuzhiyun   * -
271*4882a593Smuzhiyun     -
272*4882a593Smuzhiyun     -
273*4882a593Smuzhiyun     - 64bit support is valid only if EXT4_FEATURE_COMPAT_64BIT is set.
274*4882a593Smuzhiyun   * - 0x150
275*4882a593Smuzhiyun     - \_\_le32
276*4882a593Smuzhiyun     - s\_blocks\_count\_hi
277*4882a593Smuzhiyun     - High 32-bits of the block count.
278*4882a593Smuzhiyun   * - 0x154
279*4882a593Smuzhiyun     - \_\_le32
280*4882a593Smuzhiyun     - s\_r\_blocks\_count\_hi
281*4882a593Smuzhiyun     - High 32-bits of the reserved block count.
282*4882a593Smuzhiyun   * - 0x158
283*4882a593Smuzhiyun     - \_\_le32
284*4882a593Smuzhiyun     - s\_free\_blocks\_count\_hi
285*4882a593Smuzhiyun     - High 32-bits of the free block count.
286*4882a593Smuzhiyun   * - 0x15C
287*4882a593Smuzhiyun     - \_\_le16
288*4882a593Smuzhiyun     - s\_min\_extra\_isize
289*4882a593Smuzhiyun     - All inodes have at least # bytes.
290*4882a593Smuzhiyun   * - 0x15E
291*4882a593Smuzhiyun     - \_\_le16
292*4882a593Smuzhiyun     - s\_want\_extra\_isize
293*4882a593Smuzhiyun     - New inodes should reserve # bytes.
294*4882a593Smuzhiyun   * - 0x160
295*4882a593Smuzhiyun     - \_\_le32
296*4882a593Smuzhiyun     - s\_flags
297*4882a593Smuzhiyun     - Miscellaneous flags. See the super_flags_ table for more info.
298*4882a593Smuzhiyun   * - 0x164
299*4882a593Smuzhiyun     - \_\_le16
300*4882a593Smuzhiyun     - s\_raid\_stride
301*4882a593Smuzhiyun     - RAID stride. This is the number of logical blocks read from or written
302*4882a593Smuzhiyun       to the disk before moving to the next disk. This affects the placement
303*4882a593Smuzhiyun       of filesystem metadata, which will hopefully make RAID storage faster.
304*4882a593Smuzhiyun   * - 0x166
305*4882a593Smuzhiyun     - \_\_le16
306*4882a593Smuzhiyun     - s\_mmp\_interval
307*4882a593Smuzhiyun     - #. seconds to wait in multi-mount prevention (MMP) checking. In theory,
308*4882a593Smuzhiyun       MMP is a mechanism to record in the superblock which host and device
309*4882a593Smuzhiyun       have mounted the filesystem, in order to prevent multiple mounts. This
310*4882a593Smuzhiyun       feature does not seem to be implemented...
311*4882a593Smuzhiyun   * - 0x168
312*4882a593Smuzhiyun     - \_\_le64
313*4882a593Smuzhiyun     - s\_mmp\_block
314*4882a593Smuzhiyun     - Block # for multi-mount protection data.
315*4882a593Smuzhiyun   * - 0x170
316*4882a593Smuzhiyun     - \_\_le32
317*4882a593Smuzhiyun     - s\_raid\_stripe\_width
318*4882a593Smuzhiyun     - RAID stripe width. This is the number of logical blocks read from or
319*4882a593Smuzhiyun       written to the disk before coming back to the current disk. This is used
320*4882a593Smuzhiyun       by the block allocator to try to reduce the number of read-modify-write
321*4882a593Smuzhiyun       operations in a RAID5/6.
322*4882a593Smuzhiyun   * - 0x174
323*4882a593Smuzhiyun     - \_\_u8
324*4882a593Smuzhiyun     - s\_log\_groups\_per\_flex
325*4882a593Smuzhiyun     - Size of a flexible block group is 2 ^ ``s_log_groups_per_flex``.
326*4882a593Smuzhiyun   * - 0x175
327*4882a593Smuzhiyun     - \_\_u8
328*4882a593Smuzhiyun     - s\_checksum\_type
329*4882a593Smuzhiyun     - Metadata checksum algorithm type. The only valid value is 1 (crc32c).
330*4882a593Smuzhiyun   * - 0x176
331*4882a593Smuzhiyun     - \_\_le16
332*4882a593Smuzhiyun     - s\_reserved\_pad
333*4882a593Smuzhiyun     -
334*4882a593Smuzhiyun   * - 0x178
335*4882a593Smuzhiyun     - \_\_le64
336*4882a593Smuzhiyun     - s\_kbytes\_written
337*4882a593Smuzhiyun     - Number of KiB written to this filesystem over its lifetime.
338*4882a593Smuzhiyun   * - 0x180
339*4882a593Smuzhiyun     - \_\_le32
340*4882a593Smuzhiyun     - s\_snapshot\_inum
341*4882a593Smuzhiyun     - inode number of active snapshot. (Not used in e2fsprogs/Linux.)
342*4882a593Smuzhiyun   * - 0x184
343*4882a593Smuzhiyun     - \_\_le32
344*4882a593Smuzhiyun     - s\_snapshot\_id
345*4882a593Smuzhiyun     - Sequential ID of active snapshot. (Not used in e2fsprogs/Linux.)
346*4882a593Smuzhiyun   * - 0x188
347*4882a593Smuzhiyun     - \_\_le64
348*4882a593Smuzhiyun     - s\_snapshot\_r\_blocks\_count
349*4882a593Smuzhiyun     - Number of blocks reserved for active snapshot's future use. (Not used in
350*4882a593Smuzhiyun       e2fsprogs/Linux.)
351*4882a593Smuzhiyun   * - 0x190
352*4882a593Smuzhiyun     - \_\_le32
353*4882a593Smuzhiyun     - s\_snapshot\_list
354*4882a593Smuzhiyun     - inode number of the head of the on-disk snapshot list. (Not used in
355*4882a593Smuzhiyun       e2fsprogs/Linux.)
356*4882a593Smuzhiyun   * - 0x194
357*4882a593Smuzhiyun     - \_\_le32
358*4882a593Smuzhiyun     - s\_error\_count
359*4882a593Smuzhiyun     - Number of errors seen.
360*4882a593Smuzhiyun   * - 0x198
361*4882a593Smuzhiyun     - \_\_le32
362*4882a593Smuzhiyun     - s\_first\_error\_time
363*4882a593Smuzhiyun     - First time an error happened, in seconds since the epoch.
364*4882a593Smuzhiyun   * - 0x19C
365*4882a593Smuzhiyun     - \_\_le32
366*4882a593Smuzhiyun     - s\_first\_error\_ino
367*4882a593Smuzhiyun     - inode involved in first error.
368*4882a593Smuzhiyun   * - 0x1A0
369*4882a593Smuzhiyun     - \_\_le64
370*4882a593Smuzhiyun     - s\_first\_error\_block
371*4882a593Smuzhiyun     - Number of block involved of first error.
372*4882a593Smuzhiyun   * - 0x1A8
373*4882a593Smuzhiyun     - \_\_u8
374*4882a593Smuzhiyun     - s\_first\_error\_func[32]
375*4882a593Smuzhiyun     - Name of function where the error happened.
376*4882a593Smuzhiyun   * - 0x1C8
377*4882a593Smuzhiyun     - \_\_le32
378*4882a593Smuzhiyun     - s\_first\_error\_line
379*4882a593Smuzhiyun     - Line number where error happened.
380*4882a593Smuzhiyun   * - 0x1CC
381*4882a593Smuzhiyun     - \_\_le32
382*4882a593Smuzhiyun     - s\_last\_error\_time
383*4882a593Smuzhiyun     - Time of most recent error, in seconds since the epoch.
384*4882a593Smuzhiyun   * - 0x1D0
385*4882a593Smuzhiyun     - \_\_le32
386*4882a593Smuzhiyun     - s\_last\_error\_ino
387*4882a593Smuzhiyun     - inode involved in most recent error.
388*4882a593Smuzhiyun   * - 0x1D4
389*4882a593Smuzhiyun     - \_\_le32
390*4882a593Smuzhiyun     - s\_last\_error\_line
391*4882a593Smuzhiyun     - Line number where most recent error happened.
392*4882a593Smuzhiyun   * - 0x1D8
393*4882a593Smuzhiyun     - \_\_le64
394*4882a593Smuzhiyun     - s\_last\_error\_block
395*4882a593Smuzhiyun     - Number of block involved in most recent error.
396*4882a593Smuzhiyun   * - 0x1E0
397*4882a593Smuzhiyun     - \_\_u8
398*4882a593Smuzhiyun     - s\_last\_error\_func[32]
399*4882a593Smuzhiyun     - Name of function where the most recent error happened.
400*4882a593Smuzhiyun   * - 0x200
401*4882a593Smuzhiyun     - \_\_u8
402*4882a593Smuzhiyun     - s\_mount\_opts[64]
403*4882a593Smuzhiyun     - ASCIIZ string of mount options.
404*4882a593Smuzhiyun   * - 0x240
405*4882a593Smuzhiyun     - \_\_le32
406*4882a593Smuzhiyun     - s\_usr\_quota\_inum
407*4882a593Smuzhiyun     - Inode number of user `quota <quota>`__ file.
408*4882a593Smuzhiyun   * - 0x244
409*4882a593Smuzhiyun     - \_\_le32
410*4882a593Smuzhiyun     - s\_grp\_quota\_inum
411*4882a593Smuzhiyun     - Inode number of group `quota <quota>`__ file.
412*4882a593Smuzhiyun   * - 0x248
413*4882a593Smuzhiyun     - \_\_le32
414*4882a593Smuzhiyun     - s\_overhead\_blocks
415*4882a593Smuzhiyun     - Overhead blocks/clusters in fs. (Huh? This field is always zero, which
416*4882a593Smuzhiyun       means that the kernel calculates it dynamically.)
417*4882a593Smuzhiyun   * - 0x24C
418*4882a593Smuzhiyun     - \_\_le32
419*4882a593Smuzhiyun     - s\_backup\_bgs[2]
420*4882a593Smuzhiyun     - Block groups containing superblock backups (if sparse\_super2)
421*4882a593Smuzhiyun   * - 0x254
422*4882a593Smuzhiyun     - \_\_u8
423*4882a593Smuzhiyun     - s\_encrypt\_algos[4]
424*4882a593Smuzhiyun     - Encryption algorithms in use. There can be up to four algorithms in use
425*4882a593Smuzhiyun       at any time; valid algorithm codes are given in the super_encrypt_ table
426*4882a593Smuzhiyun       below.
427*4882a593Smuzhiyun   * - 0x258
428*4882a593Smuzhiyun     - \_\_u8
429*4882a593Smuzhiyun     - s\_encrypt\_pw\_salt[16]
430*4882a593Smuzhiyun     - Salt for the string2key algorithm for encryption.
431*4882a593Smuzhiyun   * - 0x268
432*4882a593Smuzhiyun     - \_\_le32
433*4882a593Smuzhiyun     - s\_lpf\_ino
434*4882a593Smuzhiyun     - Inode number of lost+found
435*4882a593Smuzhiyun   * - 0x26C
436*4882a593Smuzhiyun     - \_\_le32
437*4882a593Smuzhiyun     - s\_prj\_quota\_inum
438*4882a593Smuzhiyun     - Inode that tracks project quotas.
439*4882a593Smuzhiyun   * - 0x270
440*4882a593Smuzhiyun     - \_\_le32
441*4882a593Smuzhiyun     - s\_checksum\_seed
442*4882a593Smuzhiyun     - Checksum seed used for metadata\_csum calculations. This value is
443*4882a593Smuzhiyun       crc32c(~0, $orig\_fs\_uuid).
444*4882a593Smuzhiyun   * - 0x274
445*4882a593Smuzhiyun     - \_\_u8
446*4882a593Smuzhiyun     - s\_wtime_hi
447*4882a593Smuzhiyun     - Upper 8 bits of the s_wtime field.
448*4882a593Smuzhiyun   * - 0x275
449*4882a593Smuzhiyun     - \_\_u8
450*4882a593Smuzhiyun     - s\_mtime_hi
451*4882a593Smuzhiyun     - Upper 8 bits of the s_mtime field.
452*4882a593Smuzhiyun   * - 0x276
453*4882a593Smuzhiyun     - \_\_u8
454*4882a593Smuzhiyun     - s\_mkfs_time_hi
455*4882a593Smuzhiyun     - Upper 8 bits of the s_mkfs_time field.
456*4882a593Smuzhiyun   * - 0x277
457*4882a593Smuzhiyun     - \_\_u8
458*4882a593Smuzhiyun     - s\_lastcheck_hi
459*4882a593Smuzhiyun     - Upper 8 bits of the s_lastcheck_hi field.
460*4882a593Smuzhiyun   * - 0x278
461*4882a593Smuzhiyun     - \_\_u8
462*4882a593Smuzhiyun     - s\_first_error_time_hi
463*4882a593Smuzhiyun     - Upper 8 bits of the s_first_error_time_hi field.
464*4882a593Smuzhiyun   * - 0x279
465*4882a593Smuzhiyun     - \_\_u8
466*4882a593Smuzhiyun     - s\_last_error_time_hi
467*4882a593Smuzhiyun     - Upper 8 bits of the s_last_error_time_hi field.
468*4882a593Smuzhiyun   * - 0x27A
469*4882a593Smuzhiyun     - \_\_u8
470*4882a593Smuzhiyun     - s\_pad[2]
471*4882a593Smuzhiyun     - Zero padding.
472*4882a593Smuzhiyun   * - 0x27C
473*4882a593Smuzhiyun     - \_\_le16
474*4882a593Smuzhiyun     - s\_encoding
475*4882a593Smuzhiyun     - Filename charset encoding.
476*4882a593Smuzhiyun   * - 0x27E
477*4882a593Smuzhiyun     - \_\_le16
478*4882a593Smuzhiyun     - s\_encoding_flags
479*4882a593Smuzhiyun     - Filename charset encoding flags.
480*4882a593Smuzhiyun   * - 0x280
481*4882a593Smuzhiyun     - \_\_le32
482*4882a593Smuzhiyun     - s\_reserved[95]
483*4882a593Smuzhiyun     - Padding to the end of the block.
484*4882a593Smuzhiyun   * - 0x3FC
485*4882a593Smuzhiyun     - \_\_le32
486*4882a593Smuzhiyun     - s\_checksum
487*4882a593Smuzhiyun     - Superblock checksum.
488*4882a593Smuzhiyun
489*4882a593Smuzhiyun.. _super_state:
490*4882a593Smuzhiyun
491*4882a593SmuzhiyunThe superblock state is some combination of the following:
492*4882a593Smuzhiyun
493*4882a593Smuzhiyun.. list-table::
494*4882a593Smuzhiyun   :widths: 8 72
495*4882a593Smuzhiyun   :header-rows: 1
496*4882a593Smuzhiyun
497*4882a593Smuzhiyun   * - Value
498*4882a593Smuzhiyun     - Description
499*4882a593Smuzhiyun   * - 0x0001
500*4882a593Smuzhiyun     - Cleanly umounted
501*4882a593Smuzhiyun   * - 0x0002
502*4882a593Smuzhiyun     - Errors detected
503*4882a593Smuzhiyun   * - 0x0004
504*4882a593Smuzhiyun     - Orphans being recovered
505*4882a593Smuzhiyun
506*4882a593Smuzhiyun.. _super_errors:
507*4882a593Smuzhiyun
508*4882a593SmuzhiyunThe superblock error policy is one of the following:
509*4882a593Smuzhiyun
510*4882a593Smuzhiyun.. list-table::
511*4882a593Smuzhiyun   :widths: 8 72
512*4882a593Smuzhiyun   :header-rows: 1
513*4882a593Smuzhiyun
514*4882a593Smuzhiyun   * - Value
515*4882a593Smuzhiyun     - Description
516*4882a593Smuzhiyun   * - 1
517*4882a593Smuzhiyun     - Continue
518*4882a593Smuzhiyun   * - 2
519*4882a593Smuzhiyun     - Remount read-only
520*4882a593Smuzhiyun   * - 3
521*4882a593Smuzhiyun     - Panic
522*4882a593Smuzhiyun
523*4882a593Smuzhiyun.. _super_creator:
524*4882a593Smuzhiyun
525*4882a593SmuzhiyunThe filesystem creator is one of the following:
526*4882a593Smuzhiyun
527*4882a593Smuzhiyun.. list-table::
528*4882a593Smuzhiyun   :widths: 8 72
529*4882a593Smuzhiyun   :header-rows: 1
530*4882a593Smuzhiyun
531*4882a593Smuzhiyun   * - Value
532*4882a593Smuzhiyun     - Description
533*4882a593Smuzhiyun   * - 0
534*4882a593Smuzhiyun     - Linux
535*4882a593Smuzhiyun   * - 1
536*4882a593Smuzhiyun     - Hurd
537*4882a593Smuzhiyun   * - 2
538*4882a593Smuzhiyun     - Masix
539*4882a593Smuzhiyun   * - 3
540*4882a593Smuzhiyun     - FreeBSD
541*4882a593Smuzhiyun   * - 4
542*4882a593Smuzhiyun     - Lites
543*4882a593Smuzhiyun
544*4882a593Smuzhiyun.. _super_revision:
545*4882a593Smuzhiyun
546*4882a593SmuzhiyunThe superblock revision is one of the following:
547*4882a593Smuzhiyun
548*4882a593Smuzhiyun.. list-table::
549*4882a593Smuzhiyun   :widths: 8 72
550*4882a593Smuzhiyun   :header-rows: 1
551*4882a593Smuzhiyun
552*4882a593Smuzhiyun   * - Value
553*4882a593Smuzhiyun     - Description
554*4882a593Smuzhiyun   * - 0
555*4882a593Smuzhiyun     - Original format
556*4882a593Smuzhiyun   * - 1
557*4882a593Smuzhiyun     - v2 format w/ dynamic inode sizes
558*4882a593Smuzhiyun
559*4882a593SmuzhiyunNote that ``EXT4_DYNAMIC_REV`` refers to a revision 1 or newer filesystem.
560*4882a593Smuzhiyun
561*4882a593Smuzhiyun.. _super_compat:
562*4882a593Smuzhiyun
563*4882a593SmuzhiyunThe superblock compatible features field is a combination of any of the
564*4882a593Smuzhiyunfollowing:
565*4882a593Smuzhiyun
566*4882a593Smuzhiyun.. list-table::
567*4882a593Smuzhiyun   :widths: 16 64
568*4882a593Smuzhiyun   :header-rows: 1
569*4882a593Smuzhiyun
570*4882a593Smuzhiyun   * - Value
571*4882a593Smuzhiyun     - Description
572*4882a593Smuzhiyun   * - 0x1
573*4882a593Smuzhiyun     - Directory preallocation (COMPAT\_DIR\_PREALLOC).
574*4882a593Smuzhiyun   * - 0x2
575*4882a593Smuzhiyun     - “imagic inodes”. Not clear from the code what this does
576*4882a593Smuzhiyun       (COMPAT\_IMAGIC\_INODES).
577*4882a593Smuzhiyun   * - 0x4
578*4882a593Smuzhiyun     - Has a journal (COMPAT\_HAS\_JOURNAL).
579*4882a593Smuzhiyun   * - 0x8
580*4882a593Smuzhiyun     - Supports extended attributes (COMPAT\_EXT\_ATTR).
581*4882a593Smuzhiyun   * - 0x10
582*4882a593Smuzhiyun     - Has reserved GDT blocks for filesystem expansion
583*4882a593Smuzhiyun       (COMPAT\_RESIZE\_INODE). Requires RO\_COMPAT\_SPARSE\_SUPER.
584*4882a593Smuzhiyun   * - 0x20
585*4882a593Smuzhiyun     - Has directory indices (COMPAT\_DIR\_INDEX).
586*4882a593Smuzhiyun   * - 0x40
587*4882a593Smuzhiyun     - “Lazy BG”. Not in Linux kernel, seems to have been for uninitialized
588*4882a593Smuzhiyun       block groups? (COMPAT\_LAZY\_BG)
589*4882a593Smuzhiyun   * - 0x80
590*4882a593Smuzhiyun     - “Exclude inode”. Not used. (COMPAT\_EXCLUDE\_INODE).
591*4882a593Smuzhiyun   * - 0x100
592*4882a593Smuzhiyun     - “Exclude bitmap”. Seems to be used to indicate the presence of
593*4882a593Smuzhiyun       snapshot-related exclude bitmaps? Not defined in kernel or used in
594*4882a593Smuzhiyun       e2fsprogs (COMPAT\_EXCLUDE\_BITMAP).
595*4882a593Smuzhiyun   * - 0x200
596*4882a593Smuzhiyun     - Sparse Super Block, v2. If this flag is set, the SB field s\_backup\_bgs
597*4882a593Smuzhiyun       points to the two block groups that contain backup superblocks
598*4882a593Smuzhiyun       (COMPAT\_SPARSE\_SUPER2).
599*4882a593Smuzhiyun   * - 0x400
600*4882a593Smuzhiyun     - Fast commits supported. Although fast commits blocks are
601*4882a593Smuzhiyun       backward incompatible, fast commit blocks are not always
602*4882a593Smuzhiyun       present in the journal. If fast commit blocks are present in
603*4882a593Smuzhiyun       the journal, JBD2 incompat feature
604*4882a593Smuzhiyun       (JBD2\_FEATURE\_INCOMPAT\_FAST\_COMMIT) gets
605*4882a593Smuzhiyun       set (COMPAT\_FAST\_COMMIT).
606*4882a593Smuzhiyun
607*4882a593Smuzhiyun.. _super_incompat:
608*4882a593Smuzhiyun
609*4882a593SmuzhiyunThe superblock incompatible features field is a combination of any of the
610*4882a593Smuzhiyunfollowing:
611*4882a593Smuzhiyun
612*4882a593Smuzhiyun.. list-table::
613*4882a593Smuzhiyun   :widths: 16 64
614*4882a593Smuzhiyun   :header-rows: 1
615*4882a593Smuzhiyun
616*4882a593Smuzhiyun   * - Value
617*4882a593Smuzhiyun     - Description
618*4882a593Smuzhiyun   * - 0x1
619*4882a593Smuzhiyun     - Compression (INCOMPAT\_COMPRESSION).
620*4882a593Smuzhiyun   * - 0x2
621*4882a593Smuzhiyun     - Directory entries record the file type. See ext4\_dir\_entry\_2 below
622*4882a593Smuzhiyun       (INCOMPAT\_FILETYPE).
623*4882a593Smuzhiyun   * - 0x4
624*4882a593Smuzhiyun     - Filesystem needs recovery (INCOMPAT\_RECOVER).
625*4882a593Smuzhiyun   * - 0x8
626*4882a593Smuzhiyun     - Filesystem has a separate journal device (INCOMPAT\_JOURNAL\_DEV).
627*4882a593Smuzhiyun   * - 0x10
628*4882a593Smuzhiyun     - Meta block groups. See the earlier discussion of this feature
629*4882a593Smuzhiyun       (INCOMPAT\_META\_BG).
630*4882a593Smuzhiyun   * - 0x40
631*4882a593Smuzhiyun     - Files in this filesystem use extents (INCOMPAT\_EXTENTS).
632*4882a593Smuzhiyun   * - 0x80
633*4882a593Smuzhiyun     - Enable a filesystem size of 2^64 blocks (INCOMPAT\_64BIT).
634*4882a593Smuzhiyun   * - 0x100
635*4882a593Smuzhiyun     - Multiple mount protection (INCOMPAT\_MMP).
636*4882a593Smuzhiyun   * - 0x200
637*4882a593Smuzhiyun     - Flexible block groups. See the earlier discussion of this feature
638*4882a593Smuzhiyun       (INCOMPAT\_FLEX\_BG).
639*4882a593Smuzhiyun   * - 0x400
640*4882a593Smuzhiyun     - Inodes can be used to store large extended attribute values
641*4882a593Smuzhiyun       (INCOMPAT\_EA\_INODE).
642*4882a593Smuzhiyun   * - 0x1000
643*4882a593Smuzhiyun     - Data in directory entry (INCOMPAT\_DIRDATA). (Not implemented?)
644*4882a593Smuzhiyun   * - 0x2000
645*4882a593Smuzhiyun     - Metadata checksum seed is stored in the superblock. This feature enables
646*4882a593Smuzhiyun       the administrator to change the UUID of a metadata\_csum filesystem
647*4882a593Smuzhiyun       while the filesystem is mounted; without it, the checksum definition
648*4882a593Smuzhiyun       requires all metadata blocks to be rewritten (INCOMPAT\_CSUM\_SEED).
649*4882a593Smuzhiyun   * - 0x4000
650*4882a593Smuzhiyun     - Large directory >2GB or 3-level htree (INCOMPAT\_LARGEDIR). Prior to
651*4882a593Smuzhiyun       this feature, directories could not be larger than 4GiB and could not
652*4882a593Smuzhiyun       have an htree more than 2 levels deep. If this feature is enabled,
653*4882a593Smuzhiyun       directories can be larger than 4GiB and have a maximum htree depth of 3.
654*4882a593Smuzhiyun   * - 0x8000
655*4882a593Smuzhiyun     - Data in inode (INCOMPAT\_INLINE\_DATA).
656*4882a593Smuzhiyun   * - 0x10000
657*4882a593Smuzhiyun     - Encrypted inodes are present on the filesystem. (INCOMPAT\_ENCRYPT).
658*4882a593Smuzhiyun
659*4882a593Smuzhiyun.. _super_rocompat:
660*4882a593Smuzhiyun
661*4882a593SmuzhiyunThe superblock read-only compatible features field is a combination of any of
662*4882a593Smuzhiyunthe following:
663*4882a593Smuzhiyun
664*4882a593Smuzhiyun.. list-table::
665*4882a593Smuzhiyun   :widths: 16 64
666*4882a593Smuzhiyun   :header-rows: 1
667*4882a593Smuzhiyun
668*4882a593Smuzhiyun   * - Value
669*4882a593Smuzhiyun     - Description
670*4882a593Smuzhiyun   * - 0x1
671*4882a593Smuzhiyun     - Sparse superblocks. See the earlier discussion of this feature
672*4882a593Smuzhiyun       (RO\_COMPAT\_SPARSE\_SUPER).
673*4882a593Smuzhiyun   * - 0x2
674*4882a593Smuzhiyun     - This filesystem has been used to store a file greater than 2GiB
675*4882a593Smuzhiyun       (RO\_COMPAT\_LARGE\_FILE).
676*4882a593Smuzhiyun   * - 0x4
677*4882a593Smuzhiyun     - Not used in kernel or e2fsprogs (RO\_COMPAT\_BTREE\_DIR).
678*4882a593Smuzhiyun   * - 0x8
679*4882a593Smuzhiyun     - This filesystem has files whose sizes are represented in units of
680*4882a593Smuzhiyun       logical blocks, not 512-byte sectors. This implies a very large file
681*4882a593Smuzhiyun       indeed! (RO\_COMPAT\_HUGE\_FILE)
682*4882a593Smuzhiyun   * - 0x10
683*4882a593Smuzhiyun     - Group descriptors have checksums. In addition to detecting corruption,
684*4882a593Smuzhiyun       this is useful for lazy formatting with uninitialized groups
685*4882a593Smuzhiyun       (RO\_COMPAT\_GDT\_CSUM).
686*4882a593Smuzhiyun   * - 0x20
687*4882a593Smuzhiyun     - Indicates that the old ext3 32,000 subdirectory limit no longer applies
688*4882a593Smuzhiyun       (RO\_COMPAT\_DIR\_NLINK). A directory's i\_links\_count will be set to 1
689*4882a593Smuzhiyun       if it is incremented past 64,999.
690*4882a593Smuzhiyun   * - 0x40
691*4882a593Smuzhiyun     - Indicates that large inodes exist on this filesystem
692*4882a593Smuzhiyun       (RO\_COMPAT\_EXTRA\_ISIZE).
693*4882a593Smuzhiyun   * - 0x80
694*4882a593Smuzhiyun     - This filesystem has a snapshot (RO\_COMPAT\_HAS\_SNAPSHOT).
695*4882a593Smuzhiyun   * - 0x100
696*4882a593Smuzhiyun     - `Quota <Quota>`__ (RO\_COMPAT\_QUOTA).
697*4882a593Smuzhiyun   * - 0x200
698*4882a593Smuzhiyun     - This filesystem supports “bigalloc”, which means that file extents are
699*4882a593Smuzhiyun       tracked in units of clusters (of blocks) instead of blocks
700*4882a593Smuzhiyun       (RO\_COMPAT\_BIGALLOC).
701*4882a593Smuzhiyun   * - 0x400
702*4882a593Smuzhiyun     - This filesystem supports metadata checksumming.
703*4882a593Smuzhiyun       (RO\_COMPAT\_METADATA\_CSUM; implies RO\_COMPAT\_GDT\_CSUM, though
704*4882a593Smuzhiyun       GDT\_CSUM must not be set)
705*4882a593Smuzhiyun   * - 0x800
706*4882a593Smuzhiyun     - Filesystem supports replicas. This feature is neither in the kernel nor
707*4882a593Smuzhiyun       e2fsprogs. (RO\_COMPAT\_REPLICA)
708*4882a593Smuzhiyun   * - 0x1000
709*4882a593Smuzhiyun     - Read-only filesystem image; the kernel will not mount this image
710*4882a593Smuzhiyun       read-write and most tools will refuse to write to the image.
711*4882a593Smuzhiyun       (RO\_COMPAT\_READONLY)
712*4882a593Smuzhiyun   * - 0x2000
713*4882a593Smuzhiyun     - Filesystem tracks project quotas. (RO\_COMPAT\_PROJECT)
714*4882a593Smuzhiyun   * - 0x8000
715*4882a593Smuzhiyun     - Verity inodes may be present on the filesystem. (RO\_COMPAT\_VERITY)
716*4882a593Smuzhiyun
717*4882a593Smuzhiyun.. _super_def_hash:
718*4882a593Smuzhiyun
719*4882a593SmuzhiyunThe ``s_def_hash_version`` field is one of the following:
720*4882a593Smuzhiyun
721*4882a593Smuzhiyun.. list-table::
722*4882a593Smuzhiyun   :widths: 8 72
723*4882a593Smuzhiyun   :header-rows: 1
724*4882a593Smuzhiyun
725*4882a593Smuzhiyun   * - Value
726*4882a593Smuzhiyun     - Description
727*4882a593Smuzhiyun   * - 0x0
728*4882a593Smuzhiyun     - Legacy.
729*4882a593Smuzhiyun   * - 0x1
730*4882a593Smuzhiyun     - Half MD4.
731*4882a593Smuzhiyun   * - 0x2
732*4882a593Smuzhiyun     - Tea.
733*4882a593Smuzhiyun   * - 0x3
734*4882a593Smuzhiyun     - Legacy, unsigned.
735*4882a593Smuzhiyun   * - 0x4
736*4882a593Smuzhiyun     - Half MD4, unsigned.
737*4882a593Smuzhiyun   * - 0x5
738*4882a593Smuzhiyun     - Tea, unsigned.
739*4882a593Smuzhiyun
740*4882a593Smuzhiyun.. _super_mountopts:
741*4882a593Smuzhiyun
742*4882a593SmuzhiyunThe ``s_default_mount_opts`` field is any combination of the following:
743*4882a593Smuzhiyun
744*4882a593Smuzhiyun.. list-table::
745*4882a593Smuzhiyun   :widths: 8 72
746*4882a593Smuzhiyun   :header-rows: 1
747*4882a593Smuzhiyun
748*4882a593Smuzhiyun   * - Value
749*4882a593Smuzhiyun     - Description
750*4882a593Smuzhiyun   * - 0x0001
751*4882a593Smuzhiyun     - Print debugging info upon (re)mount. (EXT4\_DEFM\_DEBUG)
752*4882a593Smuzhiyun   * - 0x0002
753*4882a593Smuzhiyun     - New files take the gid of the containing directory (instead of the fsgid
754*4882a593Smuzhiyun       of the current process). (EXT4\_DEFM\_BSDGROUPS)
755*4882a593Smuzhiyun   * - 0x0004
756*4882a593Smuzhiyun     - Support userspace-provided extended attributes. (EXT4\_DEFM\_XATTR\_USER)
757*4882a593Smuzhiyun   * - 0x0008
758*4882a593Smuzhiyun     - Support POSIX access control lists (ACLs). (EXT4\_DEFM\_ACL)
759*4882a593Smuzhiyun   * - 0x0010
760*4882a593Smuzhiyun     - Do not support 32-bit UIDs. (EXT4\_DEFM\_UID16)
761*4882a593Smuzhiyun   * - 0x0020
762*4882a593Smuzhiyun     - All data and metadata are commited to the journal.
763*4882a593Smuzhiyun       (EXT4\_DEFM\_JMODE\_DATA)
764*4882a593Smuzhiyun   * - 0x0040
765*4882a593Smuzhiyun     - All data are flushed to the disk before metadata are committed to the
766*4882a593Smuzhiyun       journal. (EXT4\_DEFM\_JMODE\_ORDERED)
767*4882a593Smuzhiyun   * - 0x0060
768*4882a593Smuzhiyun     - Data ordering is not preserved; data may be written after the metadata
769*4882a593Smuzhiyun       has been written. (EXT4\_DEFM\_JMODE\_WBACK)
770*4882a593Smuzhiyun   * - 0x0100
771*4882a593Smuzhiyun     - Disable write flushes. (EXT4\_DEFM\_NOBARRIER)
772*4882a593Smuzhiyun   * - 0x0200
773*4882a593Smuzhiyun     - Track which blocks in a filesystem are metadata and therefore should not
774*4882a593Smuzhiyun       be used as data blocks. This option will be enabled by default on 3.18,
775*4882a593Smuzhiyun       hopefully. (EXT4\_DEFM\_BLOCK\_VALIDITY)
776*4882a593Smuzhiyun   * - 0x0400
777*4882a593Smuzhiyun     - Enable DISCARD support, where the storage device is told about blocks
778*4882a593Smuzhiyun       becoming unused. (EXT4\_DEFM\_DISCARD)
779*4882a593Smuzhiyun   * - 0x0800
780*4882a593Smuzhiyun     - Disable delayed allocation. (EXT4\_DEFM\_NODELALLOC)
781*4882a593Smuzhiyun
782*4882a593Smuzhiyun.. _super_flags:
783*4882a593Smuzhiyun
784*4882a593SmuzhiyunThe ``s_flags`` field is any combination of the following:
785*4882a593Smuzhiyun
786*4882a593Smuzhiyun.. list-table::
787*4882a593Smuzhiyun   :widths: 8 72
788*4882a593Smuzhiyun   :header-rows: 1
789*4882a593Smuzhiyun
790*4882a593Smuzhiyun   * - Value
791*4882a593Smuzhiyun     - Description
792*4882a593Smuzhiyun   * - 0x0001
793*4882a593Smuzhiyun     - Signed directory hash in use.
794*4882a593Smuzhiyun   * - 0x0002
795*4882a593Smuzhiyun     - Unsigned directory hash in use.
796*4882a593Smuzhiyun   * - 0x0004
797*4882a593Smuzhiyun     - To test development code.
798*4882a593Smuzhiyun
799*4882a593Smuzhiyun.. _super_encrypt:
800*4882a593Smuzhiyun
801*4882a593SmuzhiyunThe ``s_encrypt_algos`` list can contain any of the following:
802*4882a593Smuzhiyun
803*4882a593Smuzhiyun.. list-table::
804*4882a593Smuzhiyun   :widths: 8 72
805*4882a593Smuzhiyun   :header-rows: 1
806*4882a593Smuzhiyun
807*4882a593Smuzhiyun   * - Value
808*4882a593Smuzhiyun     - Description
809*4882a593Smuzhiyun   * - 0
810*4882a593Smuzhiyun     - Invalid algorithm (ENCRYPTION\_MODE\_INVALID).
811*4882a593Smuzhiyun   * - 1
812*4882a593Smuzhiyun     - 256-bit AES in XTS mode (ENCRYPTION\_MODE\_AES\_256\_XTS).
813*4882a593Smuzhiyun   * - 2
814*4882a593Smuzhiyun     - 256-bit AES in GCM mode (ENCRYPTION\_MODE\_AES\_256\_GCM).
815*4882a593Smuzhiyun   * - 3
816*4882a593Smuzhiyun     - 256-bit AES in CBC mode (ENCRYPTION\_MODE\_AES\_256\_CBC).
817*4882a593Smuzhiyun
818*4882a593SmuzhiyunTotal size of the superblock is 1024 bytes.
819