4 This is a file format of an RBD image or snapshot. It's a sparse format
5 for the full image. There are three recording sections in the file.
19 Every record has a one byte "tag" that identifies the record type,
20 followed by length of data, and then some other data.
22 Metadata records come in the first part of the image. Order is not
23 important, as long as all the metadata records come before the data
26 In v2, we have the following metadata in each section:
31 In this way, we can skip the unrecognized tag.
37 - le64: length of appending data (8)
44 - le64: length of appending data (8)
51 - le64: length of appending data (8)
52 - le64: image features
58 - le64: length of appending data (8)
59 - le64: image striping unit
65 - le64: length of appending data (8)
66 - le64: image striping count
68 ImageMeta Key and Value
69 -----------------------
72 - le64: length of appending data (length of key + length of value + 4 * 2)
73 - string: image-meta key
74 - string: image-meta value
88 Record the all snapshots and the HEAD in this section.
90 Snap Protection status
91 ----------------------
93 Record the snapshot's protection status if `--export-format=2`.
95 - le64: length of appending data (8)
96 - u8: snap protection status (0 for false, 1 for true)
101 - le64: number of diffs
104 Detail please refer to rbd-diff.rst