Debian Codegraph @

upstream/debian-trixie/man5/ext4.5

raw
1 '\" t
2 .\" -*- nroff -*-
3 .\" Copyright 1993, 1994, 1995 by Theodore Ts'o. All Rights Reserved.
4 .\" This file may be copied under the terms of the GNU Public License.
5 .\"
6 .TH EXT4 5 "January 2025" "E2fsprogs version 1.47.2"
7 .SH NAME
8 ext2 \- the second extended file system
9 .br
10 ext3 \- the third extended file system
11 .br
12 ext4 \- the fourth extended file system
13 .SH DESCRIPTION
14 The second, third, and fourth extended file systems, or ext2, ext3, and
15 ext4 as they are commonly known, are Linux file systems that have
16 historically been the default file system for many Linux distributions.
17 They are general purpose file systems that have been designed for
18 extensibility and backwards compatibility. In particular, file systems
19 previously intended for use with the ext2 and ext3 file systems can be
20 mounted using the ext4 file system driver, and indeed in many modern
21 Linux distributions, the ext4 file system driver has been configured
22 to handle mount requests for ext2 and ext3 file systems.
23 .SH FILE SYSTEM FEATURES
24 A file system formatted for ext2, ext3, or ext4 can have some
25 collection of the following file system feature flags enabled. Some of
26 these features are not supported by all implementations of the ext2,
27 ext3, and ext4 file system drivers, depending on Linux kernel version in
28 use. On other operating systems, such as the GNU/HURD or FreeBSD, only
29 a very restrictive set of file system features may be supported in their
30 implementations of ext2.
31 .TP
32 .B 64bit
33 .br
34 Enables the file system to be larger than 2^32 blocks. This feature is set
35 automatically, as needed, but it can be useful to specify this feature
36 explicitly if the file system might need to be resized larger than 2^32
37 blocks, even if it was smaller than that threshold when it was
38 originally created. Note that some older kernels and older versions
39 of e2fsprogs will not support file systems with this ext4 feature enabled.
40 .TP
41 .B bigalloc
42 .br
43 This ext4 feature enables clustered block allocation, so that the unit of
44 allocation is a power of two number of blocks. That is, each bit in the
45 what had traditionally been known as the block allocation bitmap now
46 indicates whether a cluster is in use or not, where a cluster is by
47 default composed of 16 blocks. This feature can decrease the time
48 spent on doing block allocation and brings smaller fragmentation, especially
49 for large files. The size can be specified using the
50 .B mke2fs \-C
51 option.
52 .IP
53 .B Warning:
54 The bigalloc feature is still under development, and may not be fully
55 supported with your kernel or may have various bugs. Please see the web
56 page http://ext4.wiki.kernel.org/index.php/Bigalloc for details.
57 May clash with delayed allocation (see
58 .B nodelalloc
59 mount option).
60 .IP
61 This feature requires that the
62 .B extent
63 feature be enabled.
64 .TP
65 .B casefold
66 .br
67 This ext4 feature provides file system level character encoding support
68 for directories with the casefold (+F) flag enabled. This feature is
69 name-preserving on the disk, but it allows applications to lookup for a
70 file in the file system using an encoding equivalent version of the file
71 name.
72 .TP
73 .B dir_index
74 .br
75 Use hashed b-trees to speed up name lookups in large directories. This
76 feature is supported by ext3 and ext4 file systems, and is ignored by
77 ext2 file systems.
78 .TP
79 .B dir_nlink
80 .br
81 Normally, ext4 allows an inode to have no more than 65,000 hard links.
82 This applies to regular files as well as directories, which means that
83 there can be no more than 64,998 subdirectories in a directory (because
84 each of the '.' and '..' entries, as well as the directory entry for the
85 directory in its parent directory counts as a hard link). This feature
86 lifts this limit by causing ext4 to use a link count of 1 to indicate
87 that the number of hard links to a directory is not known when the link
88 count might exceed the maximum count limit.
89 .TP
90 .B ea_inode
91 .br
92 Normally, a file's extended attributes and associated metadata must fit within
93 the inode or the inode's associated extended attribute block. This feature
94 allows the value of each extended attribute to be placed in the data blocks of a
95 separate inode if necessary, increasing the limit on the size and number of
96 extended attributes per file.
97 .TP
98 .B encrypt
99 .br
100 Enables support for file-system level encryption of data blocks and file
101 names. The inode metadata (timestamps, file size, user/group ownership,
102 etc.) is
103 .I not
104 encrypted.
105 .IP
106 This feature is most useful on file systems with multiple users, or
107 where not all files should be encrypted. In many use cases, especially
108 on single-user systems, encryption at the block device layer using
109 dm-crypt may provide much better security.
110 .TP
111 .B ext_attr
112 .br
113 This feature enables the use of extended attributes. This feature is
114 supported by ext2, ext3, and ext4.
115 .TP
116 .B extent
117 .br
118 This ext4 feature allows the mapping of logical block numbers for a
119 particular inode to physical blocks on the storage device to be stored
120 using an extent tree, which is a more efficient data structure than the
121 traditional indirect block scheme used by the ext2 and ext3 file
122 systems. The use of the extent tree decreases metadata block overhead,
123 improves file system performance, and decreases the needed to run
124 .BR e2fsck (8)
125 on the file system.
126 (Note: both
127 .B extent
128 and
129 .B extents
130 are accepted as valid names for this feature for
131 historical/backwards compatibility reasons.)
132 .TP
133 .B extra_isize
134 .br
135 This ext4 feature reserves a specific amount of space in each inode for
136 extended metadata such as nanosecond timestamps and file creation time,
137 even if the current kernel does not currently need to reserve this much
138 space. Without this feature, the kernel will reserve the amount of
139 space for features it currently needs, and the rest may be
140 consumed by extended attributes.
141
142 For this feature to be useful the inode size must be 256 bytes in size
143 or larger.
144 .TP
145 .B filetype
146 .br
147 This feature enables the storage of file type information in directory
148 entries. This feature is supported by ext2, ext3, and ext4.
149 .TP
150 .B flex_bg
151 .br
152 This ext4 feature allows the per-block group metadata (allocation
153 bitmaps
154 and inode tables)
155 to be placed anywhere on the storage media. In addition,
156 .B mke2fs
157 will place the per-block group metadata together starting at the first
158 block group of each "flex_bg group". The size of the flex_bg group
159 can be specified using the
160 .B \-G
161 option.
162 .TP
163 .B has_journal
164 .br
165 Create a journal to ensure file system consistency even across unclean
166 shutdowns. Setting the file system feature is equivalent to using the
167 .B \-j
168 option with
169 .BR mke2fs " or " tune2fs.
170 This feature is supported by ext3 and ext4, and ignored by the
171 ext2 file system driver.
172 .TP
173 .B huge_file
174 .br
175 This ext4 feature allows files to be larger than 2 terabytes in size.
176 .TP
177 .B inline_data
178 Allow data to be stored in the inode and extended attribute area.
179 .TP
180 .B journal_dev
181 .br
182 This feature is enabled on the superblock found on an external journal
183 device. The block size for the external journal must be the same as the
184 file system which uses it.
185 .IP
186 The external journal device can be used by a file system by specifying
187 the
188 .B \-J
189 .BR device= <external-device>
190 option to
191 .BR mke2fs (8)
192 or
193 .BR tune2fs 8) .
194 .TP
195 .B large_dir
196 .br
197 This feature increases the limit on the number of files per directory by
198 raising the maximum size of directories and, for hashed b-tree directories (see
199 .BR dir_index ),
200 the maximum height of the hashed b-tree used to store the directory entries.
201 .TP
202 .B large_file
203 .br
204 This feature flag is set automatically by modern kernels when a file
205 larger than 2 gigabytes is created. Very old kernels could not
206 handle large files, so this feature flag was used to prohibit those
207 kernels from mounting file systems that they could not understand.
208 .TP
209 .B metadata_csum
210 .br
211 This ext4 feature enables metadata checksumming. This feature stores
212 checksums for all of the file system metadata (superblock, group
213 descriptor blocks, inode and block bitmaps, directories, and
214 extent tree blocks). The checksum algorithm used for the metadata
215 blocks is different than the one used for group descriptors with the
216 .B uninit_bg
217 feature. These two features are incompatible and
218 .B metadata_csum
219 will be used preferentially instead of
220 .BR uninit_bg .
221 .TP
222 .B metadata_csum_seed
223 .br
224 This feature allows the file system to store the metadata checksum seed in the
225 superblock, which allows the administrator to change the UUID of a file system
226 using the
227 .B metadata_csum
228 feature while it is mounted.
229 .TP
230 .B meta_bg
231 .br
232 This ext4 feature allows file systems to be resized on-line without explicitly
233 needing to reserve space for growth in the size of the block group
234 descriptors. This scheme is also used to resize file systems which are
235 larger than 2^32 blocks. It is not recommended that this feature be set
236 when a file system is created, since this alternate method of storing
237 the block group descriptors will slow down the time needed to mount the
238 file system, and newer kernels can automatically set this feature as
239 necessary when doing an online resize and no more reserved space is
240 available in the resize inode.
241 .TP
242 .B mmp
243 .br
244 This ext4 feature provides multiple mount protection (MMP). MMP helps to
245 protect the file system from being multiply mounted and is useful in
246 shared storage environments.
247 .TP
248 .B orphan_file
249 .br
250 This ext4 feature fixes a potential scalability bottleneck for workloads
251 that are doing a large number of truncate or file extensions in
252 parallel. It is supported by Linux kernels starting version 5.15, and
253 by e2fsprogs starting with version 1.47.0.
254 .TP
255 .B project
256 .br
257 This ext4 feature provides project quota support. With this feature,
258 the project ID of inode will be managed when the file system is mounted.
259 .TP
260 .B quota
261 .br
262 Create quota inodes (inode #3 for userquota and inode
263 #4 for group quota) and set them in the superblock.
264 With this feature, the quotas will be enabled
265 automatically when the file system is mounted.
266 .IP
267 Causes the quota files (i.e., user.quota and
268 group.quota which existed
269 in the older quota design) to be hidden inodes.
270 .TP
271 .B resize_inode
272 .br
273 This file system feature indicates that space has been reserved so that
274 the block group descriptor table can be extended while resizing a mounted
275 file system. The online resize operation
276 is carried out by the kernel, triggered by
277 .BR resize2fs (8).
278 By default
279 .B mke2fs
280 will attempt to reserve enough space so that the
281 file system may grow to 1024 times its initial size. This can be changed
282 using the
283 .B resize
284 extended option.
285 .IP
286 This feature requires that the
287 .B sparse_super
288 or
289 .B sparse_super2
290 feature be enabled.
291 .TP
292 .B sparse_super
293 .br
294 This file system feature is set on all modern ext2, ext3, and ext4 file
295 systems. It indicates that backup copies of the superblock and block
296 group descriptors are present only in a few block groups, not all of
297 them.
298 .TP
299 .B sparse_super2
300 .br
301 This feature indicates that there will only be at most two backup
302 superblocks and block group descriptors. The block groups used to store
303 the backup superblock(s) and blockgroup descriptor(s) are stored in the
304 superblock, but typically, one will be located at the beginning of block
305 group #1, and one in the last block group in the file system. This
306 feature is essentially a more extreme version of sparse_super and is
307 designed to allow a much larger percentage of the disk to have
308 contiguous blocks available for data files.
309 .TP
310 .B stable_inodes
311 .br
312 Marks the file system's inode numbers and UUID as stable.
313 .BR resize2fs (8)
314 will not allow shrinking a file system with this feature, nor
315 will
316 .BR tune2fs (8)
317 allow changing its UUID. This feature allows the use of specialized encryption
318 settings that make use of the inode numbers and UUID. Note that the
319 .B encrypt
320 feature still needs to be enabled separately.
321 .B stable_inodes
322 is a "compat" feature, so old kernels will allow it.
323 .TP
324 .B uninit_bg
325 .br
326 This ext4 file system feature indicates that the block group descriptors
327 will be protected using checksums, making it safe for
328 .BR mke2fs (8)
329 to create a file system without initializing all of the block groups.
330 The kernel will keep a high watermark of unused inodes, and initialize
331 inode tables and blocks lazily. This feature speeds up the time to check
332 the file system using
333 .BR e2fsck (8),
334 and it also speeds up the time required for
335 .BR mke2fs (8)
336 to create the file system.
337 .TP
338 .B verity
339 .br
340 Enables support for verity protected files. Verity files are readonly,
341 and their data is transparently verified against a Merkle tree hidden
342 past the end of the file. Using the Merkle tree's root hash, a verity
343 file can be efficiently authenticated, independent of the file's size.
344 .IP
345 This feature is most useful for authenticating important read-only files
346 on read-write file systems. If the file system itself is read-only,
347 then using dm-verity to authenticate the entire block device may provide
348 much better security.
349 .SH MOUNT OPTIONS
350 This section describes mount options which are specific to ext2, ext3,
351 and ext4. Other generic mount options may be used as well; see
352 .BR mount (8)
353 for details.
354 .SH "Mount options for ext2"
355 The `ext2' file system is the standard Linux file system.
356 Since Linux 2.5.46, for most mount options the default
357 is determined by the file system superblock. Set them with
358 .BR tune2fs (8).
359 .TP
360 .BR acl | noacl
361 Support POSIX Access Control Lists (or not). See the
362 .BR acl (5)
363 manual page.
364 .TP
365 .BR bsddf | minixdf
366 Set the behavior for the
367 .I statfs
368 system call. The
369 .B minixdf
370 behavior is to return in the
371 .I f_blocks
372 field the total number of blocks of the file system, while the
373 .B bsddf
374 behavior (which is the default) is to subtract the overhead blocks
375 used by the ext2 file system and not available for file storage. Thus
376 .sp 1
377 % mount /k \-o minixdf; df /k; umount /k
378 .TS
379 tab(#);
380 l2 l2 r2 l2 l2 l
381 l c r c c l.
382 File System#1024-blocks#Used#Available#Capacity#Mounted on
383 /dev/sda6#2630655#86954#2412169#3%#/k
384 .TE
385 .sp 1
386 % mount /k \-o bsddf; df /k; umount /k
387 .TS
388 tab(#);
389 l2 l2 r2 l2 l2 l
390 l c r c c l.
391 File System#1024-blocks#Used#Available#Capacity#Mounted on
392 /dev/sda6#2543714#13#2412169#0%#/k
393 .TE
394 .sp 1
395 (Note that this example shows that one can add command line options
396 to the options given in
397 .IR /etc/fstab .)
398 .TP
399 .BR check=none " or " nocheck
400 No checking is done at mount time. This is the default. This is fast.
401 It is wise to invoke
402 .BR e2fsck (8)
403 every now and then, e.g.\& at boot time. The non-default behavior is unsupported
404 (check=normal and check=strict options have been removed). Note that these mount options
405 don't have to be supported if ext4 kernel driver is used for ext2 and ext3 file systems.
406 .TP
407 .B debug
408 Print debugging info upon each (re)mount.
409 .TP
410 .BR errors= { continue | remount-ro | panic }
411 Define the behavior when an error is encountered.
412 (Either ignore errors and just mark the file system erroneous and continue,
413 or remount the file system read-only, or panic and halt the system.)
414 The default is set in the file system superblock, and can be
415 changed using
416 .BR tune2fs (8).
417 .TP
418 .BR grpid | bsdgroups " and " nogrpid | sysvgroups
419 These options define what group id a newly created file gets.
420 When
421 .B grpid
422 is set, it takes the group id of the directory in which it is created;
423 otherwise (the default) it takes the fsgid of the current process, unless
424 the directory has the setgid bit set, in which case it takes the gid
425 from the parent directory, and also gets the setgid bit set
426 if it is a directory itself.
427 .TP
428 .BR grpquota | noquota | quota | usrquota
429 The usrquota (same as quota) mount option enables user quota support on the
430 file system. grpquota enables group quotas support. You need the quota utilities
431 to actually enable and manage the quota system.
432 .TP
433 .B nouid32
434 Disables 32-bit UIDs and GIDs. This is for interoperability with older
435 kernels which only store and expect 16-bit values.
436 .TP
437 .BR oldalloc " or " orlov
438 Use old allocator or Orlov allocator for new inodes. Orlov is default.
439 .TP
440 \fBresgid=\fP\,\fIn\fP and \fBresuid=\fP\,\fIn\fP
441 The ext2 file system reserves a certain percentage of the available
442 space (by default 5%, see
443 .BR mke2fs (8)
444 and
445 .BR tune2fs (8)).
446 These options determine who can use the reserved blocks.
447 (Roughly: whoever has the specified uid, or belongs to the specified group.)
448 .TP
449 .BI sb= n
450 Instead of using the normal superblock, use an alternative superblock
451 specified by
452 .IR n .
453 This option is normally used when the primary superblock has been
454 corrupted. The location of backup superblocks is dependent on the
455 file system's blocksize, the number of blocks per group, and features
456 such as
457 .BR sparse_super .
458 .IP
459 Additional backup superblocks can be determined by using the
460 .B mke2fs
461 program using the
462 .B \-n
463 option to print out where the superblocks exist, supposing
464 .B mke2fs
465 is supplied with arguments that are consistent with the file system's layout
466 (e.g., blocksize, blocks per group,
467 .BR sparse_super ,
468 etc.).
469 .IP
470 The block number here uses 1\ k units. Thus, if you want to use logical
471 block 32768 on a file system with 4\ k blocks, use "sb=131072".
472 .TP
473 .BR user_xattr | nouser_xattr
474 Support "user." extended attributes (or not).
475
476
477 .SH "Mount options for ext3"
478 The ext3 file system is a version of the ext2 file system which has been
479 enhanced with journaling. It supports the same options as ext2 as
480 well as the following additions:
481 .TP
482 .BR journal_dev=devnum / journal_path=path
483 When the external journal device's major/minor numbers
484 have changed, these options allow the user to specify
485 the new journal location. The journal device is
486 identified either through its new major/minor numbers encoded
487 in devnum, or via a path to the device.
488 .TP
489 .BR norecovery / noload
490 Don't load the journal on mounting. Note that
491 if the file system was not unmounted cleanly,
492 skipping the journal replay will lead to the
493 file system containing inconsistencies that can
494 lead to any number of problems.
495 .TP
496 .BR data= { journal | ordered | writeback }
497 Specifies the journaling mode for file data. Metadata is always journaled.
498 To use modes other than
499 .B ordered
500 on the root file system, pass the mode to the kernel as boot parameter, e.g.\&
501 .IR rootflags=data=journal .
502 .RS
503 .TP
504 .B journal
505 All data is committed into the journal prior to being written into the
506 main file system.
507 .TP
508 .B ordered
509 This is the default mode. All data is forced directly out to the main file
510 system prior to its metadata being committed to the journal.
511 .TP
512 .B writeback
513 Data ordering is not preserved \(en data may be written into the main
514 file system after its metadata has been committed to the journal.
515 This is rumoured to be the highest-throughput option. It guarantees
516 internal file system integrity, however it can allow old data to appear
517 in files after a crash and journal recovery.
518 .RE
519 .TP
520 .B data_err=ignore
521 Just print an error message if an error occurs in a file data buffer in
522 ordered mode.
523 .TP
524 .B data_err=abort
525 Abort the journal if an error occurs in a file data buffer in ordered mode.
526 .TP
527 .BR barrier=0 " / " barrier=1
528 This disables / enables the use of write barriers in the jbd code. barrier=0
529 disables, barrier=1 enables (default). This also requires an IO stack which can
530 support barriers, and if jbd gets an error on a barrier write, it will disable
531 barriers again with a warning. Write barriers enforce proper on-disk ordering
532 of journal commits, making volatile disk write caches safe to use, at some
533 performance penalty. If your disks are battery-backed in one way or another,
534 disabling barriers may safely improve performance.
535 .TP
536 .BI commit= nrsec
537 Start a journal commit every
538 .I nrsec
539 seconds. The default value is 5 seconds. Zero means default.
540 .TP
541 .B user_xattr
542 Enable Extended User Attributes. See the
543 .BR attr (5)
544 manual page.
545 .TP
546 .BR jqfmt= { vfsold | vfsv0 | vfsv1 }
547 Apart from the old quota system (as in ext2, jqfmt=vfsold aka version 1 quota)
548 ext3 also supports journaled quotas (version 2 quota). jqfmt=vfsv0 or
549 jqfmt=vfsv1 enables journaled quotas. Journaled quotas have the advantage that
550 even after a crash no quota check is required. When the
551 .B quota
552 file system feature is enabled, journaled quotas are used automatically, and
553 this mount option is ignored.
554 .TP
555 .BR usrjquota=aquota.user | grpjquota=aquota.group
556 For journaled quotas (jqfmt=vfsv0 or jqfmt=vfsv1), the mount options
557 usrjquota=aquota.user and grpjquota=aquota.group are required to tell the
558 quota system which quota database files to use. When the
559 .B quota
560 file system feature is enabled, journaled quotas are used automatically, and
561 this mount option is ignored.
562
563 .SH "Mount options for ext4"
564 The ext4 file system is an advanced level of the ext3 file system which
565 incorporates scalability and reliability enhancements for supporting large
566 file system.
567
568 The options
569 .B journal_dev, journal_path, norecovery, noload, data, commit, orlov,
570 .B oldalloc, [no]user_xattr, [no]acl, bsddf, minixdf, debug, errors,
571 .B data_err, grpid, bsdgroups, nogrpid, sysvgroups, resgid, resuid, sb,
572 .B quota, noquota, nouid32, grpquota, usrquota, usrjquota, grpjquota,
573 .B and jqfmt are backwardly compatible with ext3 or ext2.
574 .TP
575 .B journal_checksum | nojournal_checksum
576 The journal_checksum option enables checksumming of the journal transactions.
577 This will allow the recovery code in e2fsck and the kernel to detect corruption
578 in the kernel. It is a compatible change and will be ignored by older kernels.
579 .TP
580 .B journal_async_commit
581 Commit block can be written to disk without waiting for descriptor blocks. If
582 enabled older kernels cannot mount the device.
583 This will enable 'journal_checksum' internally.
584 .TP
585 .BR barrier=0 " / " barrier=1 " / " barrier " / " nobarrier
586 These mount options have the same effect as in ext3. The mount options
587 "barrier" and "nobarrier" are added for consistency with other ext4 mount
588 options.
589
590 The ext4 file system enables write barriers by default.
591 .TP
592 .BI inode_readahead_blks= n
593 This tuning parameter controls the maximum number of inode table blocks that
594 ext4's inode table readahead algorithm will pre-read into the buffer cache.
595 The value must be a power of 2. The default value is 32 blocks.
596 .TP
597 .BI stripe= n
598 Number of file system blocks that mballoc will try to use for allocation size
599 and alignment. For RAID5/6 systems this should be the number of data disks *
600 RAID chunk size in file system blocks.
601 .TP
602 .B delalloc
603 Deferring block allocation until write-out time.
604 .TP
605 .B nodelalloc
606 Disable delayed allocation. Blocks are allocated when data is copied from user
607 to page cache.
608 .TP
609 .BI max_batch_time= usec
610 Maximum amount of time ext4 should wait for additional file system operations to
611 be batch together with a synchronous write operation. Since a synchronous
612 write operation is going to force a commit and then a wait for the I/O
613 complete, it doesn't cost much, and can be a huge throughput win, we wait for a
614 small amount of time to see if any other transactions can piggyback on the
615 synchronous write. The algorithm used is designed to automatically tune for
616 the speed of the disk, by measuring the amount of time (on average) that it
617 takes to finish committing a transaction. Call this time the "commit time".
618 If the time that the transaction has been running is less than the commit time,
619 ext4 will try sleeping for the commit time to see if other operations will join
620 the transaction. The commit time is capped by the max_batch_time, which
621 defaults to 15000\ \[mc]s (15\ ms). This optimization can be turned off entirely by
622 setting max_batch_time to 0.
623 .TP
624 .BI min_batch_time= usec
625 This parameter sets the commit time (as described above) to be at least
626 min_batch_time. It defaults to zero microseconds. Increasing this parameter
627 may improve the throughput of multi-threaded, synchronous workloads on very
628 fast disks, at the cost of increasing latency.
629 .TP
630 .BI journal_ioprio= prio
631 The I/O priority (from 0 to 7, where 0 is the highest priority) which should be
632 used for I/O operations submitted by kjournald2 during a commit operation.
633 This defaults to 3, which is a slightly higher priority than the default I/O
634 priority.
635 .TP
636 .B abort
637 Simulate the effects of calling ext4_abort() for
638 debugging purposes. This is normally used while
639 remounting a file system which is already mounted.
640 .TP
641 .BR auto_da_alloc | noauto_da_alloc
642 Many broken applications don't use fsync() when
643 replacing existing files via patterns such as
644
645 fd = open("foo.new")/write(fd,...)/close(fd)/ rename("foo.new", "foo")
646
647 or worse yet
648
649 fd = open("foo", O_TRUNC)/write(fd,...)/close(fd).
650
651 If auto_da_alloc is enabled, ext4 will detect the replace-via-rename and
652 replace-via-truncate patterns and force that any delayed allocation blocks are
653 allocated such that at the next journal commit, in the default data=ordered
654 mode, the data blocks of the new file are forced to disk before the rename()
655 operation is committed. This provides roughly the same level of guarantees as
656 ext3, and avoids the "zero-length" problem that can happen when a system
657 crashes before the delayed allocation blocks are forced to disk.
658 .TP
659 .B noinit_itable
660 Do not initialize any uninitialized inode table blocks in the background. This
661 feature may be used by installation CD's so that the install process can
662 complete as quickly as possible; the inode table initialization process would
663 then be deferred until the next time the file system is mounted.
664 .TP
665 .B init_itable=n
666 The lazy itable init code will wait n times the number of milliseconds it took
667 to zero out the previous block group's inode table. This minimizes the impact on
668 system performance while the file system's inode table is being initialized.
669 .TP
670 .BR discard / nodiscard
671 Controls whether ext4 should issue discard/TRIM commands to the underlying
672 block device when blocks are freed. This is useful for SSD devices and
673 sparse/thinly-provisioned LUNs, but it is off by default until sufficient
674 testing has been done.
675 .TP
676 .BR block_validity / noblock_validity
677 This option enables/disables the in-kernel facility for tracking
678 file system metadata blocks within internal data structures. This allows multi-\c
679 block allocator and other routines to quickly locate extents which might
680 overlap with file system metadata blocks. This option is intended for debugging
681 purposes and since it negatively affects the performance, it is off by default.
682 .TP
683 .BR dioread_lock / dioread_nolock
684 Controls whether or not ext4 should use the DIO read locking. If the
685 dioread_nolock option is specified ext4 will allocate uninitialized extent
686 before buffer write and convert the extent to initialized after IO completes.
687 This approach allows ext4 code to avoid using inode mutex, which improves
688 scalability on high speed storages. However this does not work with data
689 journaling and dioread_nolock option will be ignored with kernel warning.
690 Note that dioread_nolock code path is only used for extent-based files.
691 Because of the restrictions this options comprises it is off by default
692 (e.g.\& dioread_lock).
693 .TP
694 .B max_dir_size_kb=n
695 This limits the size of the directories so that any attempt to expand them
696 beyond the specified limit in kilobytes will cause an ENOSPC error. This is
697 useful in memory-constrained environments, where a very large directory can
698 cause severe performance problems or even provoke the Out Of Memory killer. (For
699 example, if there is only 512\~MiB memory available, a 176\~MiB directory may
700 seriously cramp the system's style.)
701 .TP
702 .B i_version
703 Enable 64-bit inode version support. This option is off by default.
704 .TP
705 .B nombcache
706 This option disables use of mbcache for extended attribute deduplication. On
707 systems where extended attributes are rarely or never shared between files,
708 use of mbcache for deduplication adds unnecessary computational overhead.
709 .TP
710 .B prjquota
711 The prjquota mount option enables project quota support on the file system.
712 You need the quota utilities to actually enable and manage the quota system.
713 This mount option requires the
714 .B project
715 file system feature.
716
717 .SH FILE ATTRIBUTES
718 The ext2, ext3, and ext4 file systems support setting the following file
719 attributes on Linux systems using the
720 .BR chattr (1)
721 utility:
722 .sp
723 .BR a " \- append only"
724 .sp
725 .BR A " \- no atime updates"
726 .sp
727 .BR d " \- no dump"
728 .sp
729 .BR D " \- synchronous directory updates"
730 .sp
731 .BR i " \- immutable"
732 .sp
733 .BR S " \- synchronous updates"
734 .sp
735 .BR u " \- undeletable"
736 .sp
737 In addition, the ext3 and ext4 file systems support the following flag:
738 .sp
739 .BR j " \- data journaling"
740 .sp
741 Finally, the ext4 file system also supports the following flag:
742 .sp
743 .BR e " \- extents format"
744 .sp
745 For descriptions of these attribute flags, please refer to the
746 .BR chattr (1)
747 man page.
748 .SH KERNEL SUPPORT
749 This section lists the file system driver (e.g., ext2, ext3, ext4) and
750 upstream kernel version where a particular file system feature was
751 supported. Note that in some cases the feature was present in earlier
752 kernel versions, but there were known, serious bugs. In other cases the
753 feature may still be considered in an experimental state. Finally, note
754 that some distributions may have backported features into older kernels;
755 in particular the kernel versions in certain "enterprise distributions"
756 can be extremely misleading.
757 .IP "\fBfiletype\fR" 2i
758 ext2, 2.2.0
759 .IP "\fBsparse_super\fR" 2i
760 ext2, 2.2.0
761 .IP "\fBlarge_file\fR" 2i
762 ext2, 2.2.0
763 .IP "\fBhas_journal\fR" 2i
764 ext3, 2.4.15
765 .IP "\fBext_attr\fR" 2i
766 ext2/ext3, 2.6.0
767 .IP "\fBdir_index\fR" 2i
768 ext3, 2.6.0
769 .IP "\fBresize_inode\fR" 2i
770 ext3, 2.6.10 (online resizing)
771 .IP "\fB64bit\fR" 2i
772 ext4, 2.6.28
773 .IP "\fBdir_nlink\fR" 2i
774 ext4, 2.6.28
775 .IP "\fBextent\fR" 2i
776 ext4, 2.6.28
777 .IP "\fBextra_isize\fR" 2i
778 ext4, 2.6.28
779 .IP "\fBflex_bg\fR" 2i
780 ext4, 2.6.28
781 .IP "\fBhuge_file\fR" 2i
782 ext4, 2.6.28
783 .IP "\fBmeta_bg\fR" 2i
784 ext4, 2.6.28
785 .IP "\fBuninit_bg\fR" 2i
786 ext4, 2.6.28
787 .IP "\fBmmp\fR" 2i
788 ext4, 3.0
789 .IP "\fBbigalloc\fR" 2i
790 ext4, 3.2
791 .IP "\fBquota\fR" 2i
792 ext4, 3.6
793 .IP "\fBinline_data\fR" 2i
794 ext4, 3.8
795 .IP "\fBsparse_super2\fR" 2i
796 ext4, 3.16
797 .IP "\fBmetadata_csum\fR" 2i
798 ext4, 3.18
799 .IP "\fBencrypt\fR" 2i
800 ext4, 4.1
801 .IP "\fBmetadata_csum_seed\fR" 2i
802 ext4, 4.4
803 .IP "\fBproject\fR" 2i
804 ext4, 4.5
805 .IP "\fBea_inode\fR" 2i
806 ext4, 4.13
807 .IP "\fBlarge_dir\fR" 2i
808 ext4, 4.13
809 .IP "\fBcasefold\fR" 2i
810 ext4, 5.2
811 .IP "\fBverity\fR" 2i
812 ext4, 5.4
813 .IP "\fBstable_inodes\fR" 2i
814 ext4, 5.5
815 .SH SEE ALSO
816 .BR mke2fs (8),
817 .BR mke2fs.conf (5),
818 .BR e2fsck (8),
819 .BR dumpe2fs (8),
820 .BR tune2fs (8),
821 .BR debugfs (8),
822 .BR mount (8),
823 .BR chattr (1)