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