diff options
author | Darrick J. Wong <darrick.wong@oracle.com> | 2018-07-29 15:36:00 -0400 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2018-07-29 15:36:00 -0400 |
commit | 489fcb912477e4f4ba5fb65b223331fb8d352a07 (patch) | |
tree | 40fed04dd23f20d4c72fa78f4885c17310c12781 /Documentation/filesystems | |
parent | a801e569970b9bdc2d1182266d559e610bfc0dc6 (diff) |
ext4: convert ext4.rst to restructuredtext format
Convert the existing ext4 documentation into rst format and link it in
with the rest of the kernel documentation.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'Documentation/filesystems')
-rw-r--r-- | Documentation/filesystems/ext4/ext4.rst | 113 | ||||
-rw-r--r-- | Documentation/filesystems/ext4/index.rst | 16 | ||||
-rw-r--r-- | Documentation/filesystems/index.rst | 8 |
3 files changed, 89 insertions, 48 deletions
diff --git a/Documentation/filesystems/ext4/ext4.rst b/Documentation/filesystems/ext4/ext4.rst index 7f628b9f7c4b..47f614c47f56 100644 --- a/Documentation/filesystems/ext4/ext4.rst +++ b/Documentation/filesystems/ext4/ext4.rst | |||
@@ -1,6 +1,8 @@ | |||
1 | .. SPDX-License-Identifier: GPL-2.0 | ||
1 | 2 | ||
2 | Ext4 Filesystem | 3 | ======================== |
3 | =============== | 4 | General Information |
5 | ======================== | ||
4 | 6 | ||
5 | Ext4 is an advanced level of the ext3 filesystem which incorporates | 7 | Ext4 is an advanced level of the ext3 filesystem which incorporates |
6 | scalability and reliability enhancements for supporting large filesystems | 8 | scalability and reliability enhancements for supporting large filesystems |
@@ -11,18 +13,18 @@ Mailing list: linux-ext4@vger.kernel.org | |||
11 | Web site: http://ext4.wiki.kernel.org | 13 | Web site: http://ext4.wiki.kernel.org |
12 | 14 | ||
13 | 15 | ||
14 | 1. Quick usage instructions: | 16 | Quick usage instructions |
15 | =========================== | 17 | ======================== |
16 | 18 | ||
17 | Note: More extensive information for getting started with ext4 can be | 19 | Note: More extensive information for getting started with ext4 can be |
18 | found at the ext4 wiki site at the URL: | 20 | found at the ext4 wiki site at the URL: |
19 | http://ext4.wiki.kernel.org/index.php/Ext4_Howto | 21 | http://ext4.wiki.kernel.org/index.php/Ext4_Howto |
20 | 22 | ||
21 | - Compile and install the latest version of e2fsprogs (as of this | 23 | - Compile and install the latest version of e2fsprogs (as of this |
22 | writing version 1.41.3) from: | 24 | writing version 1.41.3) from: |
23 | 25 | ||
24 | http://sourceforge.net/project/showfiles.php?group_id=2406 | 26 | http://sourceforge.net/project/showfiles.php?group_id=2406 |
25 | 27 | ||
26 | or | 28 | or |
27 | 29 | ||
28 | https://www.kernel.org/pub/linux/kernel/people/tytso/e2fsprogs/ | 30 | https://www.kernel.org/pub/linux/kernel/people/tytso/e2fsprogs/ |
@@ -37,16 +39,16 @@ Note: More extensive information for getting started with ext4 can be | |||
37 | you will need to merge your changes with the version from e2fsprogs | 39 | you will need to merge your changes with the version from e2fsprogs |
38 | 1.41.x. | 40 | 1.41.x. |
39 | 41 | ||
40 | - Create a new filesystem using the ext4 filesystem type: | 42 | - Create a new filesystem using the ext4 filesystem type::: |
41 | 43 | ||
42 | # mke2fs -t ext4 /dev/hda1 | 44 | # mke2fs -t ext4 /dev/hda1 |
43 | 45 | ||
44 | Or to configure an existing ext3 filesystem to support extents: | 46 | Or to configure an existing ext3 filesystem to support extents::: |
45 | 47 | ||
46 | # tune2fs -O extents /dev/hda1 | 48 | # tune2fs -O extents /dev/hda1 |
47 | 49 | ||
48 | If the filesystem was created with 128 byte inodes, it can be | 50 | If the filesystem was created with 128 byte inodes, it can be |
49 | converted to use 256 byte for greater efficiency via: | 51 | converted to use 256 byte for greater efficiency via::: |
50 | 52 | ||
51 | # tune2fs -I 256 /dev/hda1 | 53 | # tune2fs -I 256 /dev/hda1 |
52 | 54 | ||
@@ -54,7 +56,7 @@ Note: More extensive information for getting started with ext4 can be | |||
54 | filesystem back to ext3; so please do not do try this on production | 56 | filesystem back to ext3; so please do not do try this on production |
55 | filesystems.) | 57 | filesystems.) |
56 | 58 | ||
57 | - Mounting: | 59 | - Mounting::: |
58 | 60 | ||
59 | # mount -t ext4 /dev/hda1 /wherever | 61 | # mount -t ext4 /dev/hda1 /wherever |
60 | 62 | ||
@@ -75,10 +77,11 @@ Note: More extensive information for getting started with ext4 can be | |||
75 | the filesystem with a large journal can also be helpful for | 77 | the filesystem with a large journal can also be helpful for |
76 | metadata-intensive workloads. | 78 | metadata-intensive workloads. |
77 | 79 | ||
78 | 2. Features | 80 | Features |
79 | =========== | 81 | ======== |
80 | 82 | ||
81 | 2.1 Currently available | 83 | Currently Available |
84 | ------------------- | ||
82 | 85 | ||
83 | * ability to use filesystems > 16TB (e2fsprogs support not available yet) | 86 | * ability to use filesystems > 16TB (e2fsprogs support not available yet) |
84 | * extent format reduces metadata overhead (RAM, IO for access, transactions) | 87 | * extent format reduces metadata overhead (RAM, IO for access, transactions) |
@@ -103,7 +106,8 @@ Note: More extensive information for getting started with ext4 can be | |||
103 | [1] Filesystems with a block size of 1k may see a limit imposed by the | 106 | [1] Filesystems with a block size of 1k may see a limit imposed by the |
104 | directory hash tree having a maximum depth of two. | 107 | directory hash tree having a maximum depth of two. |
105 | 108 | ||
106 | 2.2 Candidate features for future inclusion | 109 | Candidate Features for Future Inclusion |
110 | --------------------------------------- | ||
107 | 111 | ||
108 | * online defrag (patches available but not well tested) | 112 | * online defrag (patches available but not well tested) |
109 | * reduced mke2fs time via lazy itable initialization in conjunction with | 113 | * reduced mke2fs time via lazy itable initialization in conjunction with |
@@ -122,12 +126,15 @@ grouping of bitmaps and inode tables. Some test results available here: | |||
122 | - http://www.bullopensource.org/ext4/20080818-ffsb/ffsb-write-2.6.27-rc1.html | 126 | - http://www.bullopensource.org/ext4/20080818-ffsb/ffsb-write-2.6.27-rc1.html |
123 | - http://www.bullopensource.org/ext4/20080818-ffsb/ffsb-readwrite-2.6.27-rc1.html | 127 | - http://www.bullopensource.org/ext4/20080818-ffsb/ffsb-readwrite-2.6.27-rc1.html |
124 | 128 | ||
125 | 3. Options | 129 | Options |
126 | ========== | 130 | ======= |
127 | 131 | ||
128 | When mounting an ext4 filesystem, the following option are accepted: | 132 | When mounting an ext4 filesystem, the following option are accepted: |
129 | (*) == default | 133 | (*) == default |
130 | 134 | ||
135 | ======================= ======================================================= | ||
136 | Mount Option Description | ||
137 | ======================= ======================================================= | ||
131 | ro Mount filesystem read only. Note that ext4 will | 138 | ro Mount filesystem read only. Note that ext4 will |
132 | replay the journal (and thus write to the | 139 | replay the journal (and thus write to the |
133 | partition) even when mounted "read only". The | 140 | partition) even when mounted "read only". The |
@@ -387,33 +394,38 @@ i_version Enable 64-bit inode version support. This option is | |||
387 | dax Use direct access (no page cache). See | 394 | dax Use direct access (no page cache). See |
388 | Documentation/filesystems/dax.txt. Note that | 395 | Documentation/filesystems/dax.txt. Note that |
389 | this option is incompatible with data=journal. | 396 | this option is incompatible with data=journal. |
397 | ======================= ======================================================= | ||
390 | 398 | ||
391 | Data Mode | 399 | Data Mode |
392 | ========= | 400 | ========= |
393 | There are 3 different data modes: | 401 | There are 3 different data modes: |
394 | 402 | ||
395 | * writeback mode | 403 | * writeback mode |
396 | In data=writeback mode, ext4 does not journal data at all. This mode provides | 404 | |
397 | a similar level of journaling as that of XFS, JFS, and ReiserFS in its default | 405 | In data=writeback mode, ext4 does not journal data at all. This mode provides |
398 | mode - metadata journaling. A crash+recovery can cause incorrect data to | 406 | a similar level of journaling as that of XFS, JFS, and ReiserFS in its default |
399 | appear in files which were written shortly before the crash. This mode will | 407 | mode - metadata journaling. A crash+recovery can cause incorrect data to |
400 | typically provide the best ext4 performance. | 408 | appear in files which were written shortly before the crash. This mode will |
409 | typically provide the best ext4 performance. | ||
401 | 410 | ||
402 | * ordered mode | 411 | * ordered mode |
403 | In data=ordered mode, ext4 only officially journals metadata, but it logically | 412 | |
404 | groups metadata information related to data changes with the data blocks into a | 413 | In data=ordered mode, ext4 only officially journals metadata, but it logically |
405 | single unit called a transaction. When it's time to write the new metadata | 414 | groups metadata information related to data changes with the data blocks into |
406 | out to disk, the associated data blocks are written first. In general, | 415 | a single unit called a transaction. When it's time to write the new metadata |
407 | this mode performs slightly slower than writeback but significantly faster than journal mode. | 416 | out to disk, the associated data blocks are written first. In general, this |
417 | mode performs slightly slower than writeback but significantly faster than | ||
418 | journal mode. | ||
408 | 419 | ||
409 | * journal mode | 420 | * journal mode |
410 | data=journal mode provides full data and metadata journaling. All new data is | 421 | |
411 | written to the journal first, and then to its final location. | 422 | data=journal mode provides full data and metadata journaling. All new data is |
412 | In the event of a crash, the journal can be replayed, bringing both data and | 423 | written to the journal first, and then to its final location. In the event of |
413 | metadata into a consistent state. This mode is the slowest except when data | 424 | a crash, the journal can be replayed, bringing both data and metadata into a |
414 | needs to be read from and written to disk at the same time where it | 425 | consistent state. This mode is the slowest except when data needs to be read |
415 | outperforms all others modes. Enabling this mode will disable delayed | 426 | from and written to disk at the same time where it outperforms all others |
416 | allocation and O_DIRECT support. | 427 | modes. Enabling this mode will disable delayed allocation and O_DIRECT |
428 | support. | ||
417 | 429 | ||
418 | /proc entries | 430 | /proc entries |
419 | ============= | 431 | ============= |
@@ -425,10 +437,12 @@ Information about mounted ext4 file systems can be found in | |||
425 | in table below. | 437 | in table below. |
426 | 438 | ||
427 | Files in /proc/fs/ext4/<devname> | 439 | Files in /proc/fs/ext4/<devname> |
428 | .............................................................................. | 440 | |
441 | ================ ======= | ||
429 | File Content | 442 | File Content |
443 | ================ ======= | ||
430 | mb_groups details of multiblock allocator buddy cache of free blocks | 444 | mb_groups details of multiblock allocator buddy cache of free blocks |
431 | .............................................................................. | 445 | ================ ======= |
432 | 446 | ||
433 | /sys entries | 447 | /sys entries |
434 | ============ | 448 | ============ |
@@ -439,28 +453,30 @@ Information about mounted ext4 file systems can be found in | |||
439 | /sys/fs/ext4/dm-0). The files in each per-device directory are shown | 453 | /sys/fs/ext4/dm-0). The files in each per-device directory are shown |
440 | in table below. | 454 | in table below. |
441 | 455 | ||
442 | Files in /sys/fs/ext4/<devname> | 456 | Files in /sys/fs/ext4/<devname>: |
457 | |||
443 | (see also Documentation/ABI/testing/sysfs-fs-ext4) | 458 | (see also Documentation/ABI/testing/sysfs-fs-ext4) |
444 | .............................................................................. | ||
445 | File Content | ||
446 | 459 | ||
460 | ============================= ================================================= | ||
461 | File Content | ||
462 | ============================= ================================================= | ||
447 | delayed_allocation_blocks This file is read-only and shows the number of | 463 | delayed_allocation_blocks This file is read-only and shows the number of |
448 | blocks that are dirty in the page cache, but | 464 | blocks that are dirty in the page cache, but |
449 | which do not have their location in the | 465 | which do not have their location in the |
450 | filesystem allocated yet. | 466 | filesystem allocated yet. |
451 | 467 | ||
452 | inode_goal Tuning parameter which (if non-zero) controls | 468 | inode_goal Tuning parameter which (if non-zero) controls |
453 | the goal inode used by the inode allocator in | 469 | the goal inode used by the inode allocator in |
454 | preference to all other allocation heuristics. | 470 | preference to all other allocation heuristics. |
455 | This is intended for debugging use only, and | 471 | This is intended for debugging use only, and |
456 | should be 0 on production systems. | 472 | should be 0 on production systems. |
457 | 473 | ||
458 | inode_readahead_blks Tuning parameter which controls the maximum | 474 | inode_readahead_blks Tuning parameter which controls the maximum |
459 | number of inode table blocks that ext4's inode | 475 | number of inode table blocks that ext4's inode |
460 | table readahead algorithm will pre-read into | 476 | table readahead algorithm will pre-read into |
461 | the buffer cache | 477 | the buffer cache |
462 | 478 | ||
463 | lifetime_write_kbytes This file is read-only and shows the number of | 479 | lifetime_write_kbytes This file is read-only and shows the number of |
464 | kilobytes of data that have been written to this | 480 | kilobytes of data that have been written to this |
465 | filesystem since it was created. | 481 | filesystem since it was created. |
466 | 482 | ||
@@ -508,7 +524,7 @@ Files in /sys/fs/ext4/<devname> | |||
508 | in the file system. If there is not enough space | 524 | in the file system. If there is not enough space |
509 | for the reserved space when mounting the file | 525 | for the reserved space when mounting the file |
510 | mount will _not_ fail. | 526 | mount will _not_ fail. |
511 | .............................................................................. | 527 | ============================= ================================================= |
512 | 528 | ||
513 | Ioctls | 529 | Ioctls |
514 | ====== | 530 | ====== |
@@ -518,8 +534,10 @@ through the system call interfaces. The list of all Ext4 specific ioctls are | |||
518 | shown in the table below. | 534 | shown in the table below. |
519 | 535 | ||
520 | Table of Ext4 specific ioctls | 536 | Table of Ext4 specific ioctls |
521 | .............................................................................. | 537 | |
522 | Ioctl Description | 538 | ============================= ================================================= |
539 | Ioctl Description | ||
540 | ============================= ================================================= | ||
523 | EXT4_IOC_GETFLAGS Get additional attributes associated with inode. | 541 | EXT4_IOC_GETFLAGS Get additional attributes associated with inode. |
524 | The ioctl argument is an integer bitfield, with | 542 | The ioctl argument is an integer bitfield, with |
525 | bit values described in ext4.h. This ioctl is an | 543 | bit values described in ext4.h. This ioctl is an |
@@ -610,8 +628,7 @@ Table of Ext4 specific ioctls | |||
610 | normal user by accident. | 628 | normal user by accident. |
611 | The data blocks of the previous boot loader | 629 | The data blocks of the previous boot loader |
612 | will be associated with the given inode. | 630 | will be associated with the given inode. |
613 | 631 | ============================= ================================================= | |
614 | .............................................................................. | ||
615 | 632 | ||
616 | References | 633 | References |
617 | ========== | 634 | ========== |
diff --git a/Documentation/filesystems/ext4/index.rst b/Documentation/filesystems/ext4/index.rst new file mode 100644 index 000000000000..1270b34f643f --- /dev/null +++ b/Documentation/filesystems/ext4/index.rst | |||
@@ -0,0 +1,16 @@ | |||
1 | .. SPDX-License-Identifier: GPL-2.0 | ||
2 | |||
3 | ==== | ||
4 | ext4 | ||
5 | ==== | ||
6 | |||
7 | General usage and on-disk artifacts writen by ext4. More documentation may | ||
8 | be ported from the wiki as time permits. This should be considered the | ||
9 | canonical source of information as the details here have been reviewed by | ||
10 | the ext4 community. | ||
11 | |||
12 | .. toctree:: | ||
13 | :maxdepth: 5 | ||
14 | :numbered: | ||
15 | |||
16 | ext4 | ||
diff --git a/Documentation/filesystems/index.rst b/Documentation/filesystems/index.rst index 53b89d0edc15..7c57b3927308 100644 --- a/Documentation/filesystems/index.rst +++ b/Documentation/filesystems/index.rst | |||
@@ -2,6 +2,14 @@ | |||
2 | Linux Filesystems API | 2 | Linux Filesystems API |
3 | ===================== | 3 | ===================== |
4 | 4 | ||
5 | The documentation in this section are provided by specific filesystem | ||
6 | subprojects. | ||
7 | |||
8 | .. toctree:: | ||
9 | :maxdepth: 2 | ||
10 | |||
11 | ext4/index | ||
12 | |||
5 | The Linux VFS | 13 | The Linux VFS |
6 | ============= | 14 | ============= |
7 | 15 | ||