Expand description
Pure-Rust qcow2 metadata parser for format-aware replication optimization. Pure-Rust qcow2 metadata parser for format-aware replication optimization.
Provides:
- File detection via magic bytes (
0x514649fb) - Header parsing (cluster size, backing file, virtual size)
- Persistent dirty bitmap parsing for delta replication
All operations are read-only – foxingd never modifies qcow2 metadata. All integers in qcow2 are big-endian.
Structs§
- Bitmap
Info - Information about a persistent dirty bitmap.
- Qcow2
Info - Parsed qcow2 header metadata.
Functions§
- detect
- Detect whether a file is a qcow2 image by reading the header.
Returns
Ok(None)for non-qcow2 files (magic/version mismatch – expected for most files). ReturnsErrfor genuine I/O or parse failures. - list_
bitmaps - List all persistent bitmaps in a qcow2 image.
- read_
dirty_ bitmap - Read a specific dirty bitmap and return the list of dirty regions.
Returns dirty regions as
Vec<DirtyRange>compatible withcopy_delta().