thermal: core: using power_efficient_wq for thermal worker
[sfrench/cifs-2.6.git] / Documentation / filesystems / ext4 / ondisk / blocks.rst
1 .. SPDX-License-Identifier: GPL-2.0
2
3 Blocks
4 ------
5
6 ext4 allocates storage space in units of “blocks”. A block is a group of
7 sectors between 1KiB and 64KiB, and the number of sectors must be an
8 integral power of 2. Blocks are in turn grouped into larger units called
9 block groups. Block size is specified at mkfs time and typically is
10 4KiB. You may experience mounting problems if block size is greater than
11 page size (i.e. 64KiB blocks on a i386 which only has 4KiB memory
12 pages). By default a filesystem can contain 2^32 blocks; if the '64bit'
13 feature is enabled, then a filesystem can have 2^64 blocks.
14
15 For 32-bit filesystems, limits are as follows:
16
17 .. list-table::
18    :widths: 1 1 1 1 1
19    :header-rows: 1
20
21    * - Item
22      - 1KiB
23      - 2KiB
24      - 4KiB
25      - 64KiB
26    * - Blocks
27      - 2^32
28      - 2^32
29      - 2^32
30      - 2^32
31    * - Inodes
32      - 2^32
33      - 2^32
34      - 2^32
35      - 2^32
36    * - File System Size
37      - 4TiB
38      - 8TiB
39      - 16TiB
40      - 256PiB
41    * - Blocks Per Block Group
42      - 8,192
43      - 16,384
44      - 32,768
45      - 524,288
46    * - Inodes Per Block Group
47      - 8,192
48      - 16,384
49      - 32,768
50      - 524,288
51    * - Block Group Size
52      - 8MiB
53      - 32MiB
54      - 128MiB
55      - 32GiB
56    * - Blocks Per File, Extents
57      - 2^32
58      - 2^32
59      - 2^32
60      - 2^32
61    * - Blocks Per File, Block Maps
62      - 16,843,020
63      - 134,480,396
64      - 1,074,791,436
65      - 4,398,314,962,956 (really 2^32 due to field size limitations)
66    * - File Size, Extents
67      - 4TiB
68      - 8TiB
69      - 16TiB
70      - 256TiB
71    * - File Size, Block Maps
72      - 16GiB
73      - 256GiB
74      - 4TiB
75      - 256TiB
76
77 For 64-bit filesystems, limits are as follows:
78
79 .. list-table::
80    :widths: 1 1 1 1 1
81    :header-rows: 1
82
83    * - Item
84      - 1KiB
85      - 2KiB
86      - 4KiB
87      - 64KiB
88    * - Blocks
89      - 2^64
90      - 2^64
91      - 2^64
92      - 2^64
93    * - Inodes
94      - 2^32
95      - 2^32
96      - 2^32
97      - 2^32
98    * - File System Size
99      - 16ZiB
100      - 32ZiB
101      - 64ZiB
102      - 1YiB
103    * - Blocks Per Block Group
104      - 8,192
105      - 16,384
106      - 32,768
107      - 524,288
108    * - Inodes Per Block Group
109      - 8,192
110      - 16,384
111      - 32,768
112      - 524,288
113    * - Block Group Size
114      - 8MiB
115      - 32MiB
116      - 128MiB
117      - 32GiB
118    * - Blocks Per File, Extents
119      - 2^32
120      - 2^32
121      - 2^32
122      - 2^32
123    * - Blocks Per File, Block Maps
124      - 16,843,020
125      - 134,480,396
126      - 1,074,791,436
127      - 4,398,314,962,956 (really 2^32 due to field size limitations)
128    * - File Size, Extents
129      - 4TiB
130      - 8TiB
131      - 16TiB
132      - 256TiB
133    * - File Size, Block Maps
134      - 16GiB
135      - 256GiB
136      - 4TiB
137      - 256TiB
138
139 Note: Files not using extents (i.e. files using block maps) must be
140 placed within the first 2^32 blocks of a filesystem. Files with extents
141 must be placed within the first 2^48 blocks of a filesystem. It's not
142 clear what happens with larger filesystems.