synology_apm_repo.sdk.dedup.extent module¶
The plain value types a DedupFile hands out: its extents and an export’s
result. A leaf module (no imports from the rest of dedup/), so chunk_walk
and export_scheduler can use them without importing dedup_file, which
imports both.
- class synology_apm_repo.sdk.dedup.extent.ExtentKind(*values)¶
Bases:
EnumThe kind of a
DedupFileextent.ZERO(an explicitChunkMapKind.ZEROchunk-map record) andHOLE(a gap between records) both read back as zero bytes but are counted separately: aHOLEis a sparse gap, aZEROis recorded zero data.- DATA = 1¶
- ZERO = 2¶
- HOLE = 3¶
- class synology_apm_repo.sdk.dedup.extent.DataExtent(offset, length, addr, map_num, repeat=0)¶
Bases:
objectA
DATAspan:addris the template’s starting address and the span’s chunks are drawn from its1 + repeatrepetitions ofmap_numchunks (ChunkAddress.advance’s carry semantics).- addr: ChunkAddress¶
- class synology_apm_repo.sdk.dedup.extent.GapExtent(offset, length, kind)¶
Bases:
objectA span that reads back as zero bytes: a
HOLEor aZERO.
- synology_apm_repo.sdk.dedup.extent.Extent = synology_apm_repo.sdk.dedup.extent.DataExtent | synology_apm_repo.sdk.dedup.extent.GapExtent¶
One contiguous span of a
DedupFile;kindtells the two apart.
- class synology_apm_repo.sdk.dedup.extent.ExportResult(bytes_written, logical_size, holes, zeros, sink_wait_seconds=0.0)¶
Bases:
objectThe outcome of one
export_range()call.- Variables:
bytes_written (int) – Real
DATAbytes written, excluding any zero-fill.logical_size (int) – The exported file’s full logical size.
holes (int) – Total bytes of
HOLEregions in the range.zeros (int) – Total bytes of
ZEROregions in the range.sink_wait_seconds (float) – Seconds a segmented export waited for its sink to accept the next segment;
0.0for any other sink.