Skip to content

Commit

Permalink
btrfs-progs: docs: corrected table on chunk_item.
Browse files Browse the repository at this point in the history
Corrected table format in RST.
Added minor detailed explainations.

Signed-off-by: HAN Yuwei <[email protected]>
  • Loading branch information
hanyuwei70 committed Oct 7, 2024
1 parent c2c922f commit b166bd7
Showing 1 changed file with 30 additions and 19 deletions.
49 changes: 30 additions & 19 deletions Documentation/dev/On-disk-format.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1074,27 +1074,38 @@ Off Size Type Description
===== ==== ==== ==============================


CHUNK_ITEM (e4)
CHUNK_ITEM (0xe4)
^^^^^^^^^^^^^^^

(100, logical address) TODO

| ``   Maps logical address to physical.``
| ``    0  8 UINT   size of chunk (bytes)``
| ``    8  8 OBJID  root referencing this chunk (2)``
| ``   10  8 UINT   stripe length``
| ``   18  8 UINT   type (same as flags for block group?)``
| ``   20  4 UINT   optimal io alignment``
| ``   24  4 UINT   optimal io width``
| ``   28  4 UINT   minimal io size (sector size)``
| ``   2c  2 UINT   number of stripes``
| ``   2e  2 UINT   sub stripes``
| ``   30``
| ``   Stripes follow (for each number of stripes):``
| ``    0  8 OBJID  device id``
| ``    8  8 UINT   offset``
| ``   10 10 UUID   device UUID``
| ``   20``
Key format: (100, logical address)

Maps logical address to physical.

==== ==== ===== ===========
Off Size Type Description
==== ==== ===== ===========
0x0 0x8 UINT size of chunk (bytes)
0x8 0x8 OBJID root referencing this chunk(2)
0x10 0x8 UINT stripe length
0x18 0x8 UINT type (same as flags for block group?)
0x20 0x4 UINT optimal io alignment
0x24 0x4 UINT optimal io width
0x28 0x4 UINT minimal io size (sector size)
0x2c 0x2 UINT number of stripes
0x2e 0x2 UINT sub stripes (only for RAID10,fixed 2)
0x30
==== ==== ===== ===========

Stripes follow (for each number of stripes):

==== ==== ===== ===========
Off Size Type Description
==== ==== ===== ===========
0x0 0x8 OBJID device id
0x8 0x8 UINT physical offset of stripe on device
0x10 0x10 UUID device UUID
0x20
==== ==== ===== ===========


STRING_ITEM (fd)
Expand Down

0 comments on commit b166bd7

Please sign in to comment.