Expand description
We currently store two of these super-blocks (A/B) starting at offset 0 and 512kB.
Immediately following the serialized SuperBlockHeader
structure below is a stream of
serialized operations that are replayed into the root parent ObjectStore
. Note that the root
parent object store exists entirely in RAM until serialized back into the super-block.
Super-blocks are updated alternately with a monotonically increasing generation number.
At mount time, the super-block used is the valid SuperBlock
with the highest generation
number.
Note the asymmetry here regarding load/save:
- We load a superblock from a Device/SuperBlockInstance and return a (SuperBlockHeader, ObjectStore) pair. The ObjectStore is populated directly from device.
- We save a superblock from a (SuperBlockHeader, Vec
) pair to a WriteObjectHandle.
This asymmetry is required for consistency.
The Vec
Structs§
- Record
Reader - Super
Block Header V32 - Super
Block Manager - This encapsulates the A/B alternating super-block logic. All super-block load/save operations should be via the methods on this type.
Enums§
- Super
Block Instance - An enum representing one of our super-block instances.
- Super
Block Record V40 - Super
Block Record V41 - Super
Block Record V43
Constants§
- SUPER_
BLOCK_ CHUNK_ SIZE - The superblock is extended in units of
SUPER_BLOCK_CHUNK_SIZE
as required.