~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/Documentation/filesystems/ext4/bigalloc.rst

Version: ~ [ linux-6.12-rc7 ] ~ [ linux-6.11.7 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.60 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.116 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.171 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.229 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.285 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.323 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.12 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

Diff markup

Differences between /Documentation/filesystems/ext4/bigalloc.rst (Version linux-6.12-rc7) and /Documentation/filesystems/ext4/bigalloc.rst (Version linux-6.10.14)


  1 .. SPDX-License-Identifier: GPL-2.0                 1 .. SPDX-License-Identifier: GPL-2.0
  2                                                     2 
  3 Bigalloc                                            3 Bigalloc
  4 --------                                            4 --------
  5                                                     5 
  6 At the moment, the default size of a block is       6 At the moment, the default size of a block is 4KiB, which is a commonly
  7 supported page size on most MMU-capable hardwa      7 supported page size on most MMU-capable hardware. This is fortunate, as
  8 ext4 code is not prepared to handle the case w      8 ext4 code is not prepared to handle the case where the block size
  9 exceeds the page size. However, for a filesyst      9 exceeds the page size. However, for a filesystem of mostly huge files,
 10 it is desirable to be able to allocate disk bl     10 it is desirable to be able to allocate disk blocks in units of multiple
 11 blocks to reduce both fragmentation and metada     11 blocks to reduce both fragmentation and metadata overhead. The
 12 bigalloc feature provides exactly this ability     12 bigalloc feature provides exactly this ability.
 13                                                    13 
 14 The bigalloc feature (EXT4_FEATURE_RO_COMPAT_B     14 The bigalloc feature (EXT4_FEATURE_RO_COMPAT_BIGALLOC) changes ext4 to
 15 use clustered allocation, so that each bit in      15 use clustered allocation, so that each bit in the ext4 block allocation
 16 bitmap addresses a power of two number of bloc     16 bitmap addresses a power of two number of blocks. For example, if the
 17 file system is mainly going to be storing larg     17 file system is mainly going to be storing large files in the 4-32
 18 megabyte range, it might make sense to set a c     18 megabyte range, it might make sense to set a cluster size of 1 megabyte.
 19 This means that each bit in the block allocati     19 This means that each bit in the block allocation bitmap now addresses
 20 256 4k blocks. This shrinks the total size of      20 256 4k blocks. This shrinks the total size of the block allocation
 21 bitmaps for a 2T file system from 64 megabytes     21 bitmaps for a 2T file system from 64 megabytes to 256 kilobytes. It also
 22 means that a block group addresses 32 gigabyte     22 means that a block group addresses 32 gigabytes instead of 128 megabytes,
 23 also shrinking the amount of file system overh     23 also shrinking the amount of file system overhead for metadata.
 24                                                    24 
 25 The administrator can set a block cluster size     25 The administrator can set a block cluster size at mkfs time (which is
 26 stored in the s_log_cluster_size field in the      26 stored in the s_log_cluster_size field in the superblock); from then
 27 on, the block bitmaps track clusters, not indi     27 on, the block bitmaps track clusters, not individual blocks. This means
 28 that block groups can be several gigabytes in      28 that block groups can be several gigabytes in size (instead of just
 29 128MiB); however, the minimum allocation unit      29 128MiB); however, the minimum allocation unit becomes a cluster, not a
 30 block, even for directories. TaoBao had a patc     30 block, even for directories. TaoBao had a patchset to extend the “use
 31 units of clusters instead of blocks” to the      31 units of clusters instead of blocks” to the extent tree, though it is
 32 not clear where those patches went-- they even     32 not clear where those patches went-- they eventually morphed into
 33 “extent tree v2” but that code has not lan     33 “extent tree v2” but that code has not landed as of May 2015.
 34                                                    34 
                                                      

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php