Skip to content

Commit de7abd7

Browse files
djwongtytso
authored andcommitted
docs: fix ext4 documentation table formatting problems
It turns out that the latex table formatters lay out table columns with the exact proportional widths given in the table metadata, even if text overflows outside the box. This was not caught during the initial import because the HTML renderers are smart enough to fudge the table. Fix the table column width formatting problems in the data structures and algorithms documentation so that we don't have squashed columns. Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
1 parent e5f0926 commit de7abd7

10 files changed

Lines changed: 60 additions & 59 deletions

File tree

‎Documentation/filesystems/ext4/ondisk/attributes.rst‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ Extended attributes, when stored after the inode, have a header
3030
``ext4_xattr_ibody_header`` that is 4 bytes long:
3131

3232
.. list-table::
33-
:widths: 1 1 1 77
33+
:widths: 8 8 24 40
3434
:header-rows: 1
3535

3636
* - Offset
@@ -47,7 +47,7 @@ The beginning of an extended attribute block is in
4747
``struct ext4_xattr_header``, which is 32 bytes long:
4848

4949
.. list-table::
50-
:widths: 1 1 1 77
50+
:widths: 8 8 24 40
5151
:header-rows: 1
5252

5353
* - Offset
@@ -92,7 +92,7 @@ entries must be stored in sorted order. The sort order is
9292
Attributes stored inside an inode do not need be stored in sorted order.
9393

9494
.. list-table::
95-
:widths: 1 1 1 77
95+
:widths: 8 8 24 40
9696
:header-rows: 1
9797

9898
* - Offset
@@ -157,7 +157,7 @@ attribute name index field is set, and matching string is removed from
157157
the key name. Here is a map of name index values to key prefixes:
158158

159159
.. list-table::
160-
:widths: 1 79
160+
:widths: 16 64
161161
:header-rows: 1
162162

163163
* - Name Index

‎Documentation/filesystems/ext4/ondisk/checksums.rst‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ of checksum. The checksum function is whatever the superblock describes
2828
(crc32c as of October 2013) unless noted otherwise.
2929

3030
.. list-table::
31-
:widths: 1 1 4
31+
:widths: 20 8 50
3232
:header-rows: 1
3333

3434
* - Metadata

‎Documentation/filesystems/ext4/ondisk/directory.rst‎

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ is at most 263 bytes long, though on disk you'll need to reference
3434
``dirent.rec_len`` to know for sure.
3535

3636
.. list-table::
37-
:widths: 1 1 1 77
37+
:widths: 8 8 24 40
3838
:header-rows: 1
3939

4040
* - Offset
@@ -66,7 +66,7 @@ tree traversal. This format is ``ext4_dir_entry_2``, which is at most
6666
``dirent.rec_len`` to know for sure.
6767

6868
.. list-table::
69-
:widths: 1 1 1 77
69+
:widths: 8 8 24 40
7070
:header-rows: 1
7171

7272
* - Offset
@@ -99,7 +99,7 @@ tree traversal. This format is ``ext4_dir_entry_2``, which is at most
9999
The directory file type is one of the following values:
100100

101101
.. list-table::
102-
:widths: 1 79
102+
:widths: 16 64
103103
:header-rows: 1
104104

105105
* - Value
@@ -130,7 +130,7 @@ in the place where the name normally goes. The structure is
130130
``struct ext4_dir_entry_tail``:
131131

132132
.. list-table::
133-
:widths: 1 1 1 77
133+
:widths: 8 8 24 40
134134
:header-rows: 1
135135

136136
* - Offset
@@ -212,7 +212,7 @@ The root of the htree is in ``struct dx_root``, which is the full length
212212
of a data block:
213213

214214
.. list-table::
215-
:widths: 1 1 1 77
215+
:widths: 8 8 24 40
216216
:header-rows: 1
217217

218218
* - Offset
@@ -305,7 +305,7 @@ of a data block:
305305
The directory hash is one of the following values:
306306

307307
.. list-table::
308-
:widths: 1 79
308+
:widths: 16 64
309309
:header-rows: 1
310310

311311
* - Value
@@ -327,7 +327,7 @@ Interior nodes of an htree are recorded as ``struct dx_node``, which is
327327
also the full length of a data block:
328328

329329
.. list-table::
330-
:widths: 1 1 1 77
330+
:widths: 8 8 24 40
331331
:header-rows: 1
332332

333333
* - Offset
@@ -375,7 +375,7 @@ The hash maps that exist in both ``struct dx_root`` and
375375
long:
376376

377377
.. list-table::
378-
:widths: 1 1 1 77
378+
:widths: 8 8 24 40
379379
:header-rows: 1
380380

381381
* - Offset
@@ -405,7 +405,7 @@ directory index (which will ensure that there's space for the checksum.
405405
The dx\_tail structure is 8 bytes long and looks like this:
406406

407407
.. list-table::
408-
:widths: 1 1 1 77
408+
:widths: 8 8 24 40
409409
:header-rows: 1
410410

411411
* - Offset

‎Documentation/filesystems/ext4/ondisk/group_descr.rst‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ entire bitmap.
4343
The block group descriptor is laid out in ``struct ext4_group_desc``.
4444

4545
.. list-table::
46-
:widths: 1 1 1 77
46+
:widths: 8 8 24 40
4747
:header-rows: 1
4848

4949
* - Offset
@@ -157,7 +157,7 @@ The block group descriptor is laid out in ``struct ext4_group_desc``.
157157
Block group flags can be any combination of the following:
158158

159159
.. list-table::
160-
:widths: 1 79
160+
:widths: 16 64
161161
:header-rows: 1
162162

163163
* - Value

‎Documentation/filesystems/ext4/ondisk/ifork.rst‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ The extent tree header is recorded in ``struct ext4_extent_header``,
6868
which is 12 bytes long:
6969

7070
.. list-table::
71-
:widths: 1 1 1 77
71+
:widths: 8 8 24 40
7272
:header-rows: 1
7373

7474
* - Offset
@@ -104,7 +104,7 @@ Internal nodes of the extent tree, also known as index nodes, are
104104
recorded as ``struct ext4_extent_idx``, and are 12 bytes long:
105105

106106
.. list-table::
107-
:widths: 1 1 1 77
107+
:widths: 8 8 24 40
108108
:header-rows: 1
109109

110110
* - Offset
@@ -134,7 +134,7 @@ Leaf nodes of the extent tree are recorded as ``struct ext4_extent``,
134134
and are also 12 bytes long:
135135

136136
.. list-table::
137-
:widths: 1 1 1 77
137+
:widths: 8 8 24 40
138138
:header-rows: 1
139139

140140
* - Offset
@@ -174,7 +174,7 @@ including) the checksum itself.
174174
``struct ext4_extent_tail`` is 4 bytes long:
175175

176176
.. list-table::
177-
:widths: 1 1 1 77
177+
:widths: 8 8 24 40
178178
:header-rows: 1
179179

180180
* - Offset

‎Documentation/filesystems/ext4/ondisk/inodes.rst‎

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,9 @@ and the inode structure itself.
2929
The inode table entry is laid out in ``struct ext4_inode``.
3030

3131
.. list-table::
32-
:widths: 1 1 1 77
32+
:widths: 8 8 24 40
3333
:header-rows: 1
34+
:class: longtable
3435

3536
* - Offset
3637
- Size
@@ -176,7 +177,7 @@ The inode table entry is laid out in ``struct ext4_inode``.
176177
The ``i_mode`` value is a combination of the following flags:
177178

178179
.. list-table::
179-
:widths: 1 79
180+
:widths: 16 64
180181
:header-rows: 1
181182

182183
* - Value
@@ -227,7 +228,7 @@ The ``i_mode`` value is a combination of the following flags:
227228
The ``i_flags`` field is a combination of these values:
228229

229230
.. list-table::
230-
:widths: 1 79
231+
:widths: 16 64
231232
:header-rows: 1
232233

233234
* - Value
@@ -314,7 +315,7 @@ The ``osd1`` field has multiple meanings depending on the creator:
314315
Linux:
315316

316317
.. list-table::
317-
:widths: 1 1 1 77
318+
:widths: 8 8 24 40
318319
:header-rows: 1
319320

320321
* - Offset
@@ -331,7 +332,7 @@ Linux:
331332
Hurd:
332333

333334
.. list-table::
334-
:widths: 1 1 1 77
335+
:widths: 8 8 24 40
335336
:header-rows: 1
336337

337338
* - Offset
@@ -346,7 +347,7 @@ Hurd:
346347
Masix:
347348

348349
.. list-table::
349-
:widths: 1 1 1 77
350+
:widths: 8 8 24 40
350351
:header-rows: 1
351352

352353
* - Offset
@@ -365,7 +366,7 @@ The ``osd2`` field has multiple meanings depending on the filesystem creator:
365366
Linux:
366367

367368
.. list-table::
368-
:widths: 1 1 1 77
369+
:widths: 8 8 24 40
369370
:header-rows: 1
370371

371372
* - Offset
@@ -402,7 +403,7 @@ Linux:
402403
Hurd:
403404

404405
.. list-table::
405-
:widths: 1 1 1 77
406+
:widths: 8 8 24 40
406407
:header-rows: 1
407408

408409
* - Offset
@@ -433,7 +434,7 @@ Hurd:
433434
Masix:
434435

435436
.. list-table::
436-
:widths: 1 1 1 77
437+
:widths: 8 8 24 40
437438
:header-rows: 1
438439

439440
* - Offset

0 commit comments

Comments
 (0)