synology_apm_repo.sdk.units.fs module¶
FsProvider: FS workloads. Unlike VM/PC/PS, an FS
version has no per-file object_table rows — the whole version is
one shared virtual image, <snapshotUuid>/<versionId>/dedup.img, and
every file is a [content_dedup_id, content_dedup_id + file_size)
byte range within it (FORMAT-SPEC.md: fs-addressing). This is also the
cheapest tree in the project: entry_table.dirname is a full
absolute path string, so children() is one indexed equality query
per level — no recursion, no parent-id chain (FORMAT-SPEC.md: fs-addressing).
Locating dedup.img itself goes through the same target.db
mechanism as units.device (FORMAT-SPEC.md: fs-addressing): FS lands a target.db
too, purely to register version.db.zst as a dedup_object=false
object and give up its version_table.version_id, which combines
with Version.target_id (the snapshotUuid) to look dedup.img up
in db/file_map.
- class synology_apm_repo.sdk.units.fs.FsProvider(repo, version)¶
Bases:
objectUnitProviderfor one FS workload version.- async close()¶
Release the sqlite connection(s) this provider opened. Not merely for tidiness: a leaked
aiosqliteconnection’s own background worker thread keeps the interpreter alive.
- root()¶
Pure construction — no I/O, so this stays synchronous (see
UnitProvider).
- async children(node, offset=0, limit=None)¶
- async unit(node)¶