Back to home page

OSCL-LXR

 
 

    


0001 .. SPDX-License-Identifier: GPL-2.0
0002 
0003 ========================
0004 ext4 General Information
0005 ========================
0006 
0007 Ext4 is an advanced level of the ext3 filesystem which incorporates
0008 scalability and reliability enhancements for supporting large filesystems
0009 (64 bit) in keeping with increasing disk capacities and state-of-the-art
0010 feature requirements.
0011 
0012 Mailing list:   linux-ext4@vger.kernel.org
0013 Web site:       http://ext4.wiki.kernel.org
0014 
0015 
0016 Quick usage instructions
0017 ========================
0018 
0019 Note: More extensive information for getting started with ext4 can be
0020 found at the ext4 wiki site at the URL:
0021 http://ext4.wiki.kernel.org/index.php/Ext4_Howto
0022 
0023   - The latest version of e2fsprogs can be found at:
0024 
0025     https://www.kernel.org/pub/linux/kernel/people/tytso/e2fsprogs/
0026 
0027         or
0028 
0029     http://sourceforge.net/project/showfiles.php?group_id=2406
0030 
0031         or grab the latest git repository from:
0032 
0033    https://git.kernel.org/pub/scm/fs/ext2/e2fsprogs.git
0034 
0035   - Create a new filesystem using the ext4 filesystem type:
0036 
0037         # mke2fs -t ext4 /dev/hda1
0038 
0039     Or to configure an existing ext3 filesystem to support extents:
0040 
0041         # tune2fs -O extents /dev/hda1
0042 
0043     If the filesystem was created with 128 byte inodes, it can be
0044     converted to use 256 byte for greater efficiency via:
0045 
0046         # tune2fs -I 256 /dev/hda1
0047 
0048   - Mounting:
0049 
0050         # mount -t ext4 /dev/hda1 /wherever
0051 
0052   - When comparing performance with other filesystems, it's always
0053     important to try multiple workloads; very often a subtle change in a
0054     workload parameter can completely change the ranking of which
0055     filesystems do well compared to others.  When comparing versus ext3,
0056     note that ext4 enables write barriers by default, while ext3 does
0057     not enable write barriers by default.  So it is useful to use
0058     explicitly specify whether barriers are enabled or not when via the
0059     '-o barriers=[0|1]' mount option for both ext3 and ext4 filesystems
0060     for a fair comparison.  When tuning ext3 for best benchmark numbers,
0061     it is often worthwhile to try changing the data journaling mode; '-o
0062     data=writeback' can be faster for some workloads.  (Note however that
0063     running mounted with data=writeback can potentially leave stale data
0064     exposed in recently written files in case of an unclean shutdown,
0065     which could be a security exposure in some situations.)  Configuring
0066     the filesystem with a large journal can also be helpful for
0067     metadata-intensive workloads.
0068 
0069 Features
0070 ========
0071 
0072 Currently Available
0073 -------------------
0074 
0075 * ability to use filesystems > 16TB (e2fsprogs support not available yet)
0076 * extent format reduces metadata overhead (RAM, IO for access, transactions)
0077 * extent format more robust in face of on-disk corruption due to magics,
0078 * internal redundancy in tree
0079 * improved file allocation (multi-block alloc)
0080 * lift 32000 subdirectory limit imposed by i_links_count[1]
0081 * nsec timestamps for mtime, atime, ctime, create time
0082 * inode version field on disk (NFSv4, Lustre)
0083 * reduced e2fsck time via uninit_bg feature
0084 * journal checksumming for robustness, performance
0085 * persistent file preallocation (e.g for streaming media, databases)
0086 * ability to pack bitmaps and inode tables into larger virtual groups via the
0087   flex_bg feature
0088 * large file support
0089 * inode allocation using large virtual block groups via flex_bg
0090 * delayed allocation
0091 * large block (up to pagesize) support
0092 * efficient new ordered mode in JBD2 and ext4 (avoid using buffer head to force
0093   the ordering)
0094 * Case-insensitive file name lookups
0095 * file-based encryption support (fscrypt)
0096 * file-based verity support (fsverity)
0097 
0098 [1] Filesystems with a block size of 1k may see a limit imposed by the
0099 directory hash tree having a maximum depth of two.
0100 
0101 case-insensitive file name lookups
0102 ======================================================
0103 
0104 The case-insensitive file name lookup feature is supported on a
0105 per-directory basis, allowing the user to mix case-insensitive and
0106 case-sensitive directories in the same filesystem.  It is enabled by
0107 flipping the +F inode attribute of an empty directory.  The
0108 case-insensitive string match operation is only defined when we know how
0109 text in encoded in a byte sequence.  For that reason, in order to enable
0110 case-insensitive directories, the filesystem must have the
0111 casefold feature, which stores the filesystem-wide encoding
0112 model used.  By default, the charset adopted is the latest version of
0113 Unicode (12.1.0, by the time of this writing), encoded in the UTF-8
0114 form.  The comparison algorithm is implemented by normalizing the
0115 strings to the Canonical decomposition form, as defined by Unicode,
0116 followed by a byte per byte comparison.
0117 
0118 The case-awareness is name-preserving on the disk, meaning that the file
0119 name provided by userspace is a byte-per-byte match to what is actually
0120 written in the disk.  The Unicode normalization format used by the
0121 kernel is thus an internal representation, and not exposed to the
0122 userspace nor to the disk, with the important exception of disk hashes,
0123 used on large case-insensitive directories with DX feature.  On DX
0124 directories, the hash must be calculated using the casefolded version of
0125 the filename, meaning that the normalization format used actually has an
0126 impact on where the directory entry is stored.
0127 
0128 When we change from viewing filenames as opaque byte sequences to seeing
0129 them as encoded strings we need to address what happens when a program
0130 tries to create a file with an invalid name.  The Unicode subsystem
0131 within the kernel leaves the decision of what to do in this case to the
0132 filesystem, which select its preferred behavior by enabling/disabling
0133 the strict mode.  When Ext4 encounters one of those strings and the
0134 filesystem did not require strict mode, it falls back to considering the
0135 entire string as an opaque byte sequence, which still allows the user to
0136 operate on that file, but the case-insensitive lookups won't work.
0137 
0138 Options
0139 =======
0140 
0141 When mounting an ext4 filesystem, the following option are accepted:
0142 (*) == default
0143 
0144   ro
0145         Mount filesystem read only. Note that ext4 will replay the journal (and
0146         thus write to the partition) even when mounted "read only". The mount
0147         options "ro,noload" can be used to prevent writes to the filesystem.
0148 
0149   journal_checksum
0150         Enable checksumming of the journal transactions.  This will allow the
0151         recovery code in e2fsck and the kernel to detect corruption in the
0152         kernel.  It is a compatible change and will be ignored by older
0153         kernels.
0154 
0155   journal_async_commit
0156         Commit block can be written to disk without waiting for descriptor
0157         blocks. If enabled older kernels cannot mount the device. This will
0158         enable 'journal_checksum' internally.
0159 
0160   journal_path=path, journal_dev=devnum
0161         When the external journal device's major/minor numbers have changed,
0162         these options allow the user to specify the new journal location.  The
0163         journal device is identified through either its new major/minor numbers
0164         encoded in devnum, or via a path to the device.
0165 
0166   norecovery, noload
0167         Don't load the journal on mounting.  Note that if the filesystem was
0168         not unmounted cleanly, skipping the journal replay will lead to the
0169         filesystem containing inconsistencies that can lead to any number of
0170         problems.
0171 
0172   data=journal
0173         All data are committed into the journal prior to being written into the
0174         main file system.  Enabling this mode will disable delayed allocation
0175         and O_DIRECT support.
0176 
0177   data=ordered  (*)
0178         All data are forced directly out to the main file system prior to its
0179         metadata being committed to the journal.
0180 
0181   data=writeback
0182         Data ordering is not preserved, data may be written into the main file
0183         system after its metadata has been committed to the journal.
0184 
0185   commit=nrsec  (*)
0186         This setting limits the maximum age of the running transaction to
0187         'nrsec' seconds.  The default value is 5 seconds.  This means that if
0188         you lose your power, you will lose as much as the latest 5 seconds of
0189         metadata changes (your filesystem will not be damaged though, thanks
0190         to the journaling). This default value (or any low value) will hurt
0191         performance, but it's good for data-safety.  Setting it to 0 will have
0192         the same effect as leaving it at the default (5 seconds).  Setting it
0193         to very large values will improve performance.  Note that due to
0194         delayed allocation even older data can be lost on power failure since
0195         writeback of those data begins only after time set in
0196         /proc/sys/vm/dirty_expire_centisecs.
0197 
0198   barrier=<0|1(*)>, barrier(*), nobarrier
0199         This enables/disables the use of write barriers in the jbd code.
0200         barrier=0 disables, barrier=1 enables.  This also requires an IO stack
0201         which can support barriers, and if jbd gets an error on a barrier
0202         write, it will disable again with a warning.  Write barriers enforce
0203         proper on-disk ordering of journal commits, making volatile disk write
0204         caches safe to use, at some performance penalty.  If your disks are
0205         battery-backed in one way or another, disabling barriers may safely
0206         improve performance.  The mount options "barrier" and "nobarrier" can
0207         also be used to enable or disable barriers, for consistency with other
0208         ext4 mount options.
0209 
0210   inode_readahead_blks=n
0211         This tuning parameter controls the maximum number of inode table blocks
0212         that ext4's inode table readahead algorithm will pre-read into the
0213         buffer cache.  The default value is 32 blocks.
0214 
0215   nouser_xattr
0216         Disables Extended User Attributes.  See the attr(5) manual page for
0217         more information about extended attributes.
0218 
0219   noacl
0220         This option disables POSIX Access Control List support. If ACL support
0221         is enabled in the kernel configuration (CONFIG_EXT4_FS_POSIX_ACL), ACL
0222         is enabled by default on mount. See the acl(5) manual page for more
0223         information about acl.
0224 
0225   bsddf (*)
0226         Make 'df' act like BSD.
0227 
0228   minixdf
0229         Make 'df' act like Minix.
0230 
0231   debug
0232         Extra debugging information is sent to syslog.
0233 
0234   abort
0235         Simulate the effects of calling ext4_abort() for debugging purposes.
0236         This is normally used while remounting a filesystem which is already
0237         mounted.
0238 
0239   errors=remount-ro
0240         Remount the filesystem read-only on an error.
0241 
0242   errors=continue
0243         Keep going on a filesystem error.
0244 
0245   errors=panic
0246         Panic and halt the machine if an error occurs.  (These mount options
0247         override the errors behavior specified in the superblock, which can be
0248         configured using tune2fs)
0249 
0250   data_err=ignore(*)
0251         Just print an error message if an error occurs in a file data buffer in
0252         ordered mode.
0253   data_err=abort
0254         Abort the journal if an error occurs in a file data buffer in ordered
0255         mode.
0256 
0257   grpid | bsdgroups
0258         New objects have the group ID of their parent.
0259 
0260   nogrpid (*) | sysvgroups
0261         New objects have the group ID of their creator.
0262 
0263   resgid=n
0264         The group ID which may use the reserved blocks.
0265 
0266   resuid=n
0267         The user ID which may use the reserved blocks.
0268 
0269   sb=
0270         Use alternate superblock at this location.
0271 
0272   quota, noquota, grpquota, usrquota
0273         These options are ignored by the filesystem. They are used only by
0274         quota tools to recognize volumes where quota should be turned on. See
0275         documentation in the quota-tools package for more details
0276         (http://sourceforge.net/projects/linuxquota).
0277 
0278   jqfmt=<quota type>, usrjquota=<file>, grpjquota=<file>
0279         These options tell filesystem details about quota so that quota
0280         information can be properly updated during journal replay. They replace
0281         the above quota options. See documentation in the quota-tools package
0282         for more details (http://sourceforge.net/projects/linuxquota).
0283 
0284   stripe=n
0285         Number of filesystem blocks that mballoc will try to use for allocation
0286         size and alignment. For RAID5/6 systems this should be the number of
0287         data disks *  RAID chunk size in file system blocks.
0288 
0289   delalloc      (*)
0290         Defer block allocation until just before ext4 writes out the block(s)
0291         in question.  This allows ext4 to better allocation decisions more
0292         efficiently.
0293 
0294   nodelalloc
0295         Disable delayed allocation.  Blocks are allocated when the data is
0296         copied from userspace to the page cache, either via the write(2) system
0297         call or when an mmap'ed page which was previously unallocated is
0298         written for the first time.
0299 
0300   max_batch_time=usec
0301         Maximum amount of time ext4 should wait for additional filesystem
0302         operations to be batch together with a synchronous write operation.
0303         Since a synchronous write operation is going to force a commit and then
0304         a wait for the I/O complete, it doesn't cost much, and can be a huge
0305         throughput win, we wait for a small amount of time to see if any other
0306         transactions can piggyback on the synchronous write.   The algorithm
0307         used is designed to automatically tune for the speed of the disk, by
0308         measuring the amount of time (on average) that it takes to finish
0309         committing a transaction.  Call this time the "commit time".  If the
0310         time that the transaction has been running is less than the commit
0311         time, ext4 will try sleeping for the commit time to see if other
0312         operations will join the transaction.   The commit time is capped by
0313         the max_batch_time, which defaults to 15000us (15ms).   This
0314         optimization can be turned off entirely by setting max_batch_time to 0.
0315 
0316   min_batch_time=usec
0317         This parameter sets the commit time (as described above) to be at least
0318         min_batch_time.  It defaults to zero microseconds.  Increasing this
0319         parameter may improve the throughput of multi-threaded, synchronous
0320         workloads on very fast disks, at the cost of increasing latency.
0321 
0322   journal_ioprio=prio
0323         The I/O priority (from 0 to 7, where 0 is the highest priority) which
0324         should be used for I/O operations submitted by kjournald2 during a
0325         commit operation.  This defaults to 3, which is a slightly higher
0326         priority than the default I/O priority.
0327 
0328   auto_da_alloc(*), noauto_da_alloc
0329         Many broken applications don't use fsync() when replacing existing
0330         files via patterns such as fd = open("foo.new")/write(fd,..)/close(fd)/
0331         rename("foo.new", "foo"), or worse yet, fd = open("foo",
0332         O_TRUNC)/write(fd,..)/close(fd).  If auto_da_alloc is enabled, ext4
0333         will detect the replace-via-rename and replace-via-truncate patterns
0334         and force that any delayed allocation blocks are allocated such that at
0335         the next journal commit, in the default data=ordered mode, the data
0336         blocks of the new file are forced to disk before the rename() operation
0337         is committed.  This provides roughly the same level of guarantees as
0338         ext3, and avoids the "zero-length" problem that can happen when a
0339         system crashes before the delayed allocation blocks are forced to disk.
0340 
0341   noinit_itable
0342         Do not initialize any uninitialized inode table blocks in the
0343         background.  This feature may be used by installation CD's so that the
0344         install process can complete as quickly as possible; the inode table
0345         initialization process would then be deferred until the next time the
0346         file system is unmounted.
0347 
0348   init_itable=n
0349         The lazy itable init code will wait n times the number of milliseconds
0350         it took to zero out the previous block group's inode table.  This
0351         minimizes the impact on the system performance while file system's
0352         inode table is being initialized.
0353 
0354   discard, nodiscard(*)
0355         Controls whether ext4 should issue discard/TRIM commands to the
0356         underlying block device when blocks are freed.  This is useful for SSD
0357         devices and sparse/thinly-provisioned LUNs, but it is off by default
0358         until sufficient testing has been done.
0359 
0360   nouid32
0361         Disables 32-bit UIDs and GIDs.  This is for interoperability  with
0362         older kernels which only store and expect 16-bit values.
0363 
0364   block_validity(*), noblock_validity
0365         These options enable or disable the in-kernel facility for tracking
0366         filesystem metadata blocks within internal data structures.  This
0367         allows multi- block allocator and other routines to notice bugs or
0368         corrupted allocation bitmaps which cause blocks to be allocated which
0369         overlap with filesystem metadata blocks.
0370 
0371   dioread_lock, dioread_nolock
0372         Controls whether or not ext4 should use the DIO read locking. If the
0373         dioread_nolock option is specified ext4 will allocate uninitialized
0374         extent before buffer write and convert the extent to initialized after
0375         IO completes. This approach allows ext4 code to avoid using inode
0376         mutex, which improves scalability on high speed storages. However this
0377         does not work with data journaling and dioread_nolock option will be
0378         ignored with kernel warning. Note that dioread_nolock code path is only
0379         used for extent-based files.  Because of the restrictions this options
0380         comprises it is off by default (e.g. dioread_lock).
0381 
0382   max_dir_size_kb=n
0383         This limits the size of directories so that any attempt to expand them
0384         beyond the specified limit in kilobytes will cause an ENOSPC error.
0385         This is useful in memory constrained environments, where a very large
0386         directory can cause severe performance problems or even provoke the Out
0387         Of Memory killer.  (For example, if there is only 512mb memory
0388         available, a 176mb directory may seriously cramp the system's style.)
0389 
0390   i_version
0391         Enable 64-bit inode version support. This option is off by default.
0392 
0393   dax
0394         Use direct access (no page cache).  See
0395         Documentation/filesystems/dax.rst.  Note that this option is
0396         incompatible with data=journal.
0397 
0398   inlinecrypt
0399         When possible, encrypt/decrypt the contents of encrypted files using the
0400         blk-crypto framework rather than filesystem-layer encryption. This
0401         allows the use of inline encryption hardware. The on-disk format is
0402         unaffected. For more details, see
0403         Documentation/block/inline-encryption.rst.
0404 
0405 Data Mode
0406 =========
0407 There are 3 different data modes:
0408 
0409 * writeback mode
0410 
0411   In data=writeback mode, ext4 does not journal data at all.  This mode provides
0412   a similar level of journaling as that of XFS, JFS, and ReiserFS in its default
0413   mode - metadata journaling.  A crash+recovery can cause incorrect data to
0414   appear in files which were written shortly before the crash.  This mode will
0415   typically provide the best ext4 performance.
0416 
0417 * ordered mode
0418 
0419   In data=ordered mode, ext4 only officially journals metadata, but it logically
0420   groups metadata information related to data changes with the data blocks into
0421   a single unit called a transaction.  When it's time to write the new metadata
0422   out to disk, the associated data blocks are written first.  In general, this
0423   mode performs slightly slower than writeback but significantly faster than
0424   journal mode.
0425 
0426 * journal mode
0427 
0428   data=journal mode provides full data and metadata journaling.  All new data is
0429   written to the journal first, and then to its final location.  In the event of
0430   a crash, the journal can be replayed, bringing both data and metadata into a
0431   consistent state.  This mode is the slowest except when data needs to be read
0432   from and written to disk at the same time where it outperforms all others
0433   modes.  Enabling this mode will disable delayed allocation and O_DIRECT
0434   support.
0435 
0436 /proc entries
0437 =============
0438 
0439 Information about mounted ext4 file systems can be found in
0440 /proc/fs/ext4.  Each mounted filesystem will have a directory in
0441 /proc/fs/ext4 based on its device name (i.e., /proc/fs/ext4/hdc or
0442 /proc/fs/ext4/dm-0).   The files in each per-device directory are shown
0443 in table below.
0444 
0445 Files in /proc/fs/ext4/<devname>
0446 
0447   mb_groups
0448         details of multiblock allocator buddy cache of free blocks
0449 
0450 /sys entries
0451 ============
0452 
0453 Information about mounted ext4 file systems can be found in
0454 /sys/fs/ext4.  Each mounted filesystem will have a directory in
0455 /sys/fs/ext4 based on its device name (i.e., /sys/fs/ext4/hdc or
0456 /sys/fs/ext4/dm-0).   The files in each per-device directory are shown
0457 in table below.
0458 
0459 Files in /sys/fs/ext4/<devname>:
0460 
0461 (see also Documentation/ABI/testing/sysfs-fs-ext4)
0462 
0463   delayed_allocation_blocks
0464         This file is read-only and shows the number of blocks that are dirty in
0465         the page cache, but which do not have their location in the filesystem
0466         allocated yet.
0467 
0468   inode_goal
0469         Tuning parameter which (if non-zero) controls the goal inode used by
0470         the inode allocator in preference to all other allocation heuristics.
0471         This is intended for debugging use only, and should be 0 on production
0472         systems.
0473 
0474   inode_readahead_blks
0475         Tuning parameter which controls the maximum number of inode table
0476         blocks that ext4's inode table readahead algorithm will pre-read into
0477         the buffer cache.
0478 
0479   lifetime_write_kbytes
0480         This file is read-only and shows the number of kilobytes of data that
0481         have been written to this filesystem since it was created.
0482 
0483   max_writeback_mb_bump
0484         The maximum number of megabytes the writeback code will try to write
0485         out before move on to another inode.
0486 
0487   mb_group_prealloc
0488         The multiblock allocator will round up allocation requests to a
0489         multiple of this tuning parameter if the stripe size is not set in the
0490         ext4 superblock
0491 
0492   mb_max_inode_prealloc
0493         The maximum length of per-inode ext4_prealloc_space list.
0494 
0495   mb_max_to_scan
0496         The maximum number of extents the multiblock allocator will search to
0497         find the best extent.
0498 
0499   mb_min_to_scan
0500         The minimum number of extents the multiblock allocator will search to
0501         find the best extent.
0502 
0503   mb_order2_req
0504         Tuning parameter which controls the minimum size for requests (as a
0505         power of 2) where the buddy cache is used.
0506 
0507   mb_stats
0508         Controls whether the multiblock allocator should collect statistics,
0509         which are shown during the unmount. 1 means to collect statistics, 0
0510         means not to collect statistics.
0511 
0512   mb_stream_req
0513         Files which have fewer blocks than this tunable parameter will have
0514         their blocks allocated out of a block group specific preallocation
0515         pool, so that small files are packed closely together.  Each large file
0516         will have its blocks allocated out of its own unique preallocation
0517         pool.
0518 
0519   session_write_kbytes
0520         This file is read-only and shows the number of kilobytes of data that
0521         have been written to this filesystem since it was mounted.
0522 
0523   reserved_clusters
0524         This is RW file and contains number of reserved clusters in the file
0525         system which will be used in the specific situations to avoid costly
0526         zeroout, unexpected ENOSPC, or possible data loss. The default is 2% or
0527         4096 clusters, whichever is smaller and this can be changed however it
0528         can never exceed number of clusters in the file system. If there is not
0529         enough space for the reserved space when mounting the file mount will
0530         _not_ fail.
0531 
0532 Ioctls
0533 ======
0534 
0535 Ext4 implements various ioctls which can be used by applications to access
0536 ext4-specific functionality. An incomplete list of these ioctls is shown in the
0537 table below. This list includes truly ext4-specific ioctls (``EXT4_IOC_*``) as
0538 well as ioctls that may have been ext4-specific originally but are now supported
0539 by some other filesystem(s) too (``FS_IOC_*``).
0540 
0541 Table of Ext4 ioctls
0542 
0543   FS_IOC_GETFLAGS
0544         Get additional attributes associated with inode.  The ioctl argument is
0545         an integer bitfield, with bit values described in ext4.h.
0546 
0547   FS_IOC_SETFLAGS
0548         Set additional attributes associated with inode.  The ioctl argument is
0549         an integer bitfield, with bit values described in ext4.h.
0550 
0551   EXT4_IOC_GETVERSION, EXT4_IOC_GETVERSION_OLD
0552         Get the inode i_generation number stored for each inode. The
0553         i_generation number is normally changed only when new inode is created
0554         and it is particularly useful for network filesystems. The '_OLD'
0555         version of this ioctl is an alias for FS_IOC_GETVERSION.
0556 
0557   EXT4_IOC_SETVERSION, EXT4_IOC_SETVERSION_OLD
0558         Set the inode i_generation number stored for each inode. The '_OLD'
0559         version of this ioctl is an alias for FS_IOC_SETVERSION.
0560 
0561   EXT4_IOC_GROUP_EXTEND
0562         This ioctl has the same purpose as the resize mount option. It allows
0563         to resize filesystem to the end of the last existing block group,
0564         further resize has to be done with resize2fs, either online, or
0565         offline. The argument points to the unsigned logn number representing
0566         the filesystem new block count.
0567 
0568   EXT4_IOC_MOVE_EXT
0569         Move the block extents from orig_fd (the one this ioctl is pointing to)
0570         to the donor_fd (the one specified in move_extent structure passed as
0571         an argument to this ioctl). Then, exchange inode metadata between
0572         orig_fd and donor_fd.  This is especially useful for online
0573         defragmentation, because the allocator has the opportunity to allocate
0574         moved blocks better, ideally into one contiguous extent.
0575 
0576   EXT4_IOC_GROUP_ADD
0577         Add a new group descriptor to an existing or new group descriptor
0578         block. The new group descriptor is described by ext4_new_group_input
0579         structure, which is passed as an argument to this ioctl. This is
0580         especially useful in conjunction with EXT4_IOC_GROUP_EXTEND, which
0581         allows online resize of the filesystem to the end of the last existing
0582         block group.  Those two ioctls combined is used in userspace online
0583         resize tool (e.g. resize2fs).
0584 
0585   EXT4_IOC_MIGRATE
0586         This ioctl operates on the filesystem itself.  It converts (migrates)
0587         ext3 indirect block mapped inode to ext4 extent mapped inode by walking
0588         through indirect block mapping of the original inode and converting
0589         contiguous block ranges into ext4 extents of the temporary inode. Then,
0590         inodes are swapped. This ioctl might help, when migrating from ext3 to
0591         ext4 filesystem, however suggestion is to create fresh ext4 filesystem
0592         and copy data from the backup. Note, that filesystem has to support
0593         extents for this ioctl to work.
0594 
0595   EXT4_IOC_ALLOC_DA_BLKS
0596         Force all of the delay allocated blocks to be allocated to preserve
0597         application-expected ext3 behaviour. Note that this will also start
0598         triggering a write of the data blocks, but this behaviour may change in
0599         the future as it is not necessary and has been done this way only for
0600         sake of simplicity.
0601 
0602   EXT4_IOC_RESIZE_FS
0603         Resize the filesystem to a new size.  The number of blocks of resized
0604         filesystem is passed in via 64 bit integer argument.  The kernel
0605         allocates bitmaps and inode table, the userspace tool thus just passes
0606         the new number of blocks.
0607 
0608   EXT4_IOC_SWAP_BOOT
0609         Swap i_blocks and associated attributes (like i_blocks, i_size,
0610         i_flags, ...) from the specified inode with inode EXT4_BOOT_LOADER_INO
0611         (#5). This is typically used to store a boot loader in a secure part of
0612         the filesystem, where it can't be changed by a normal user by accident.
0613         The data blocks of the previous boot loader will be associated with the
0614         given inode.
0615 
0616 References
0617 ==========
0618 
0619 kernel source:  <file:fs/ext4/>
0620                 <file:fs/jbd2/>
0621 
0622 programs:       http://e2fsprogs.sourceforge.net/
0623 
0624 useful links:   https://fedoraproject.org/wiki/ext3-devel
0625                 http://www.bullopensource.org/ext4/
0626                 http://ext4.wiki.kernel.org/index.php/Main_Page
0627                 https://fedoraproject.org/wiki/Features/Ext4